Summary: Learn how to identify Windows PowerShell 3.0 disconnected sessions.
How can I find out which Windows PowerShell 3.0 sessions are disconnected?
Use the Get-PSSession cmdlet and look for sessions that have a state of disconnected, as shown here.
PS C:\> Get-PSSession
Id Name ComputerName State ConfigurationName Availability
-- ---- ------------ ----- ----------------- ------------
1 Session1 dc3 Opened Microsoft.PowerShell Available
3 Session2 dc2 Disconnected Microsoft.PowerShell None
Carsten Siemens edited Revision 3. Comment: Pirated Content - see my comment
Patris_70 edited Revision 1. Comment: deleted (en-US) title
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: Identify Disconnected PowerShell Sessions"
Published by The Scripting Guys on 22 Nov 2012
blogs.technet.com/.../powertip-identify-disconnected-powershell-sessions.aspx