PowerTip: Run Remote Command in Disconnected Session

PowerTip: Run Remote Command in Disconnected Session

  • Comments 1
  • Likes

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 

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • PowerTips are awesome, thanks for sharing Ed!