enable psremoting
Posted: Thu Oct 25, 2018 7:56 am
I have .cmd file that contains the following commands.
%~dp0psexec \\machine -u acme\adminuser -p p@ssw0rd -h -d powershell.exe "enable-psremoting -force"
I can run this from a CMD window and it works on any remote Windows 7 workstation.
Within PowerShell Studio this command works.
Start-Process -Filepath "\\server\files\PsExec.exe" -ArgumentList "\\$textPC cmd.exe"
This will open up the cmd.exe on a remote machine.
Within PowerShell Studio this command does Not works.
Start-Process -Filepath "\\server\files\PsExec.exe" \\$TextPC -u acme\adminuser -p p@ssw0rd -h -d powershell.exe "enable-psremoting -force"
so I tried to copy my .cmd to the target Windows 7 machine and run that with Invoke-Command. it runs but it does not enable psremoting.
Why would this not work?
%~dp0psexec \\machine -u acme\adminuser -p p@ssw0rd -h -d powershell.exe "enable-psremoting -force"
I can run this from a CMD window and it works on any remote Windows 7 workstation.
Within PowerShell Studio this command works.
Start-Process -Filepath "\\server\files\PsExec.exe" -ArgumentList "\\$textPC cmd.exe"
This will open up the cmd.exe on a remote machine.
Within PowerShell Studio this command does Not works.
Start-Process -Filepath "\\server\files\PsExec.exe" \\$TextPC -u acme\adminuser -p p@ssw0rd -h -d powershell.exe "enable-psremoting -force"
so I tried to copy my .cmd to the target Windows 7 machine and run that with Invoke-Command. it runs but it does not enable psremoting.
Why would this not work?