Import-PSSession brings commands from a remote computer into the current session. Microsoft Exchange uses this technique to provide remote access to the Exchange Management Shell.
The following example imports the NetAdapter module from a remote server into the current session:
$computerName = 'PSTest' $session = New-PSSession -ComputerName $computerName Import-PSSession -Session $session -Module NetAdapter
Any commands used within this module are executed against the session target, not against the local computer.
If the session is removed, the imported module and its commands will be removed from the local session.