October 12th, 2013

PowerTip: Run Remote Command in Disconnected Session

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to run a remote command in a disconnected session.

Hey, Scripting Guy! Question How can I run a remote command in a disconnected session?

Hey, Scripting Guy! Answer Invoke-Command -ComputerName S1 -Scriptblock {<commands>} -InDisconnectedSession 

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback