Contact Info

Crumbtrail

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

New-PSSession - Powershell 4.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 
commands in a PSSession, use the Invoke-Command cmdlet. To use the PSSession to interact directly with a remote 
computer, use the Enter-PSSession cmdlet. For more information, see about_PSSessions 
(http://go.microsoft.com/fwlink/?LinkID=135181).


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