Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 3.0 » Get-PSSession

Get-PSSession - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Get-PSSession

Short description
Gets the Windows PowerShell sessions on local and remote computers.

Syntax


Description
The Get-PSSession cmdlet gets the user-managed Windows PowerShell sessions ("PSSessions") on local and remote computers
.


Beginning in Windows PowerShell 3.0, sessions are stored on the computers at the remote end of each connection.  You ca
n use the ComputerName or ConnectionUri parameters of Get-PSSession to get the sessions that connect to the local compu
ter or remote computers, even if they were not created in the current session.


Without parameters, Get-PSSession gets all sessions that were created in the current session.


Use the filtering parameters, including Name, ID, InstanceID,  State, ApplicationName, and ConfigurationName to select 
from among the sessions that Get-PSSession returns.


Use the remaining parameters to configure the temporary connection in which the Get-PSSession command runs when you use
 the ComputerName or ConnectionUri parameters.


NOTE: In Windows PowerShell 2.0, without parameters, Get-PSSession gets all sessions that were created in the current s
ession. The ComputerName  parameter gets sessions that were created in the current session and connect to the specified
 computer.


For more information about Windows PowerShell sessions, see about_PSSessions (http://go.microsoft.com/fwlink/?LinkID=13
5181).