Summary: Learn how to use the Windows PowerShell 3.0 Invoke-Command cmdlet to create a disconnected session.
How can I run a command on a remote computer running Windows PowerShell 3.0 in a disconnected session?
Use the Invoke-Command cmdlet with the Disconnected parameter, as shown here. Note that icm is an alias for Invoke-Command.
icm -ComputerName dc2 -ScriptBlock {1..20 | %{get-date;gps;sleep 600} } -Disconnected
Carsten Siemens edited Revision 1. Comment: Pirated Content - see my comment
NOTE: This article was reported as Pirated/Plagiarized Content (content you didn't write) and will be removed. Please do not steal content from others. If you feel we are mistaken, please leave a comment or email tnwiki at Microsoft with a link to this article and with clear and detailed reasons why you own the content or have explicit permission from the author.
Content was taken from: "PowerTip: Run a Remote PowerShell Command in a Disconnected Session"
Published by The Scripting Guys on 20 Nov 2012
blogs.technet.com/.../powertip-run-a-remote-powershell-command-in-a-disconnected-session.aspx