Quantcast
Channel: Windows PowerShell forum
Browsing all 21975 articles
Browse latest View live

Variable inheritance and modules?

Hello everyone,I'm creating modules for few common functions and I've got stuck on module responsible for writing log files. Normally, scopes should automatically inherit variables from parent scope,...

View Article


get-help issues

I'm confused.OverviewI've written a basic cmdlet called Write-Hello. It more or less does what it says, and also contains help information. I run the script to load it into memory.  Issue 1 If I do...

View Article


[Switch] parameter on script level

I can find how [Switch] parameters are defined and used in a function, but couldn’t find how to do it on the script level. E.g. how would Recurse be handled in “dir -Recurse” if dir were written in...

View Article

SSH protocol in Windows ecosystem -- PowerShell

I guess the lack of out-of-the-box support for the open protocol, such as SSH and SFTP in Windows shells is one the main reason the PHP, Ruby and Python developers don't feelnativity in Windows...

View Article

How do I format output from two seperate commands onto one line?

get-wmiobject -Namespace "root\cimv2" -class Win32_OperatingSystem -CN localhost -prop version | Select version | FT version get-wmiobject -Namespace "root\cimv2" -class Win32_ComputerSystem -CN...

View Article


using invoke-command to install certifications unuseable

Hi,EverybodyI want to install some certificates in a domain from a domain controller for RDS. The installation is successful, but when deploying remoteApp programs, the RDS complains the certificate is...

View Article

run a dos command from powershell or dos that will stay in memory and...

hi all,i have a bat dos that i usually click on the server desktop but since it keep on crashing i want to automize it.  i tried doing an invoke-expression on powershell but this "mpmserv -debug" won't...

View Article

How do I pass a Set/p variable from a .cmd file to Powershell Command?

I need to join a customer's domain with our computers.  We won't know the domain name or the domain controller name for the user credentials until we arrive on-site.In my Powershell script I have: cmd...

View Article


Has anyone had to present to their boss's how and why you want to upgrade...

I will have to present to a technology committee the how's and why's about the upgrade. I am starting to work on it, and it would be helpful to see what others have talked about and what you've...

View Article


Computer Name in output from Invoke-Command

Is there a way to know to which computer an output text belongs when executing an Invoke-Command on a list of computers?If I run something like this:Invoke-Command -ComputerName Computer1,Computer2...

View Article

Why do I get permissions errors on only a small subset of my DCs?

Hello,When I run the code below to all our Domain Controllers in the Forest, I get the following permission error only on 5 out of 100 DCs.  All DCS are in the Forest communicating properly and I'm a...

View Article

Send-MailMessage script runs perfect on PSv3, but cannot authenticate user...

This drives me nuts: the code below runs perfectly in PowerShell Version 3. I can authenticate and send mail via live.com and googlemail.com. The password is "hardcoded" in the script, to avoid...

View Article

Running Powershell code on remote machine using C# - EXPERT HELP NEEDED

Hi guyz,i facing this issue from a long time.Im Uisng Powershell for remote operations , and sometimes for installations and uninstallations also.The problem , is for example, im remotely installing...

View Article


about Remove-ADGroupMember

A group was in domain 1,and groupmembers were in domain 2,how do I use cmd “Remove-ADGroupMember” to remove these members in this group?

View Article

need help with csv to html table ps script

I have a csv file (test.csv) similar to this:Title;Status;Type;Category;Contact name;Link Title1;In progress;Project;Management;Jack Jones;http://www.test.com/ Title2;In...

View Article


cannot install PowerShell 2.0 on SBS 2003

I am in the process of Preparing SBS 2003 for migration.One of the prep tasks is to install PowerShell 2.0I download the install WindowsServer2003-KB968930-x86-ENG.exe.I ran the install as...

View Article

Script block literals are not allowed in restricted language mode or a Data...

Here i execute power shell Scripts by using in C#:PSCredential psc = new PSCredential(@"domainname\username", SecurePswd); WSManConnectionInfo wsmConn = new WSManConnectionInfo(new Uri(strSystemURI),...

View Article


PS V3 change using Get-ChildItem command when using wildcards

Using PS V3 these two statements do what I expect.dir [[a]* # returns all files and folders beginning with either a or [ dir [a[]* # returns all files and folders beginning with either a or [Using PS...

View Article

Unrestricted PowerShell in domain using GPO

Hello,with GPO i have deployed Powershell as Remote Signed.When starting a .ps1 from a network drive the .ps1 isn`t Digitally signed.Which Group-Policy solution can i do to force .ps1 to run over the...

View Article

Query for interactive RDP session

Hi,I want to check with a Powershell script if there is anybody logged in (local or via rdp) on a set of XP virtual machines and if not open a rdp session to the next free XP vm. For testing purposes I...

View Article
Browsing all 21975 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>