Contact Info

Crumbtrail

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

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

Export-PSSession

Short description
Imports commands from another session and saves them in a Windows PowerShell module.

Syntax


Description
The Export-PSSession cmdlet gets cmdlets, functions, aliases, and other command types from another PSSession on a 
local or remote computer and saves them in a Windows PowerShell module. To add the commands from the module to the 
current session, use the Import-Module cmdlet.


Unlike Import-PSSession, which imports commands from another PSSession into the current session, Export-PSSession 
saves the commands in a module. The commands are not imported into the current session.


To export commands, first use the New-PSSession cmdlet to create a PSSession that has the commands that you want to 
export. Then use the Export-PSSession cmdlet to export the commands. By default, Export-PSSession exports all 
commands, except for commands that exist in the current session, but you can use the CommandName parameters to specify 
the commands to export.


The Export-PSSession cmdlet uses the implicit remoting feature of Windows PowerShell. When you import commands into 
the current session, they run implicitly  in the original session or in a  similar session on the originating computer.