WBC2013
asked on
Powershell script connect-mstsc.ps1 doesnt run
Hi
I am trying to use this ps1 script written by Jaap Brasser. But it doesnt do anything when I run it and I'm pretty sure I'm missing something very elementary!
The script is:
http://gallery.technet.microsoft.com/scriptcenter/Connect-Mstsc-Open-RDP-2064b10b
I have tried using "set-executionpolicy Unrestricted"
I get no error message, just a new line in the console as if it worked correctly. Mstsc.exe doesn't appear.
Can someone point out the obvious for me?
Thanks
I am trying to use this ps1 script written by Jaap Brasser. But it doesnt do anything when I run it and I'm pretty sure I'm missing something very elementary!
The script is:
http://gallery.technet.microsoft.com/scriptcenter/Connect-Mstsc-Open-RDP-2064b10b
I have tried using "set-executionpolicy Unrestricted"
I get no error message, just a new line in the console as if it worked correctly. Mstsc.exe doesn't appear.
Can someone point out the obvious for me?
Thanks
Did you read the included help in the script? Just running the .PS1 file (dot source it to make it available in the global scope) creates the function. Then you have to run the function, submitting the needed parameters.
ASKER
Ah this is the elementary mistake yes.
So I run .\connect-mstsc.ps1
But I get an error when trying to use the connect-mstsc function (as per the help notes). It says the cmdlet, function or script file is not recognised.
e.g \> connect-mstsc -computerName testPC -user TestUser -password TestPassword
So I run .\connect-mstsc.ps1
But I get an error when trying to use the connect-mstsc function (as per the help notes). It says the cmdlet, function or script file is not recognised.
e.g \> connect-mstsc -computerName testPC -user TestUser -password TestPassword
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
much appreciated!
No problem. A couple help topics that I think would be helpful and you may want to read are:
about_scope
about_operators
about_scope
about_operators