Contact Info

Crumbtrail

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

New-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 »

New-PSSession

Short description
Creates a persistent connection to a local or remote computer.

Syntax


Description
The New-PSSession cmdlet creates a Windows PowerShell session (PSSession) on a local or remote computer.  When you 
create a PSSession, Windows PowerShell establishes a persistent connection to the remote computer. 

Use a PSSession to run multiple commands that share data, such as a function or the value of a variable. To run com
mands in a PSSession, use the Invoke-Command cmdlet. To use the PSSession to interact directly with a remote comput
er, use the Enter-PSSession cmdlet. For more information, see about_PSSessions.

You can run commands on a remote computer without creating a PSSession by using the ComputerName parameters of Ente
r-PSSession or Invoke-Command. When you use the ComputerName parameter, Windows PowerShell creates a temporary conn
ection that is used for the interactive session or for a single command and is then closed.