Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 2.0 » Remove-PSSession

Remove-PSSession - Powershell 2.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 »

Remove-PSSession

Short description
Closes one or more Windows PowerShell sessions (PSSessions).

Syntax


Description
The Remove-PSSession cmdlet closes Windows PowerShell sessions (PSSessions) in the current session. It stops any co
mmands that are running in the PSSessions, ends the PSSession, and releases the resources that the PSSession was us
ing. If the PSSession is connected to a remote computer, Remove-PSSession also closes the connection between the lo
cal and remote computers.

To remove a PSSession, enter the Name, ComputerName, ID, or InstanceID of the session. 

If you have saved the PSSession in a variable, the session object remains in the variable, but the state of the PSS
ession is "Closed."