Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 36188

PowerTip: Identify Disconnected PowerShell Sessions

$
0
0

Summary: Learn how to identify Windows PowerShell 3.0 disconnected sessions.

Hey, Scripting Guy! Question How can I find out which Windows PowerShell 3.0 sessions are disconnected?

Hey, Scripting Guy! Answer 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


Viewing all articles
Browse latest Browse all 36188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>