PowerShell 2.0: One Cmdlet at a Time 36 Get-PSSession
Continuing the series looking at new cmdlets available in PowerShell 2.0. This time we look at the Get-PSSession cmdlet.
What can I do with it?
Retrieve remote PowerShell sessions created in the current session.
Examples:
Get all current sessions
Get-PSSession
Get session 3.
Get-PSSession -Id 3
Get all sessions open with Test01. (Not well illustrated in this screenshot since there is only one server with sessions open, but you get the idea)
Get-PSSession -ComputerName Test01
How could I have done this in PowerShell 1.0?
Remoting did not exist in PowerShell 1.0, you would have needed to use Remote Desktop to run an interactive session on a remote server.