Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 3.0 » Receive-PSSession

Receive-PSSession - Powershell 3.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 »

Receive-PSSession

Short description
Gets results of commands in disconnected sessions

Syntax
Receive-PSSession [-Session] <PSSession> [-JobName <String>] [-OutTarget <OutTarget>] [-Confirm] [-WhatIf] [<CommonPara
meters>]
Receive-PSSession [-ComputerName] <String> [-ApplicationName <String>] [-Authentication <AuthenticationMechanism>] [-Ce
rtificateThumbprint <String>] [-ConfigurationName <String>] [-Credential <PSCredential>] [-JobName <String>] [-OutTarge
t <OutTarget>] [-Port <Int32>] [-SessionOption <PSSessionOption>] [-UseSSL] -Name <String> [-Confirm] [-WhatIf] [<Commo
nParameters>]
Receive-PSSession [-ComputerName] <String> [-ApplicationName <String>] [-Authentication <AuthenticationMechanism>] [-Ce
rtificateThumbprint <String>] [-ConfigurationName <String>] [-Credential <PSCredential>] [-JobName <String>] [-OutTarge
t <OutTarget>] [-Port <Int32>] [-SessionOption <PSSessionOption>] [-UseSSL] -InstanceId <Guid> [-Confirm] [-WhatIf] [<C
ommonParameters>]
Receive-PSSession [-ConnectionUri] <Uri> [-AllowRedirection] [-Authentication <AuthenticationMechanism>] [-CertificateT
humbprint <String>] [-ConfigurationName <String>] [-Credential <PSCredential>] [-JobName <String>] [-OutTarget <OutTarg
et>] [-SessionOption <PSSessionOption>] -Name <String> [-Confirm] [-WhatIf] [<CommonParameters>]
Receive-PSSession [-ConnectionUri] <Uri> [-AllowRedirection] [-Authentication <AuthenticationMechanism>] [-CertificateT
humbprint <String>] [-ConfigurationName <String>] [-Credential <PSCredential>] [-JobName <String>] [-OutTarget <OutTarg
et>] [-SessionOption <PSSessionOption>] -InstanceId <Guid> [-Confirm] [-WhatIf] [<CommonParameters>]
Receive-PSSession [-Id] <Int32> [-JobName <String>] [-OutTarget <OutTarget>] [-Confirm] [-WhatIf] [<CommonParameters>]
Receive-PSSession [-InstanceId] <Guid> [-JobName <String>] [-OutTarget <OutTarget>] [-Confirm] [-WhatIf] [<CommonParame
ters>]
Receive-PSSession [-Name] <String> [-JobName <String>] [-OutTarget <OutTarget>] [-Confirm] [-WhatIf] [<CommonParameters
>]





Description
The Receive-PSSession cmdlet gets the results of commands running in Windows PowerShell sessions ("PSSession") that wer
e disconnected. If the session is currently connected, Receive-PSSession gets the results of commands that were running
 when the session was disconnected. If the session is still disconnected, Receive-PSSession connects to the session, re
sumes any commands that were suspended, and gets the results of commands running in the session.


You can use a Receive-PSSession in addition to or in place of a Connect-PSSession command. Receive-PSSession can connec
t to any disconnected or reconnected session, including those that were started in other sessions or on other computers
.


Receive-PSSession works on PSSessions that were disconnected intentionally, such as by using the Disconnect-PSSession c
mdlet or the InDisconnectedSession parameter of the Invoke-Command cmdlet, or unintentionally, such as by a network int
erruption.


If you use the Receive-PSSession cmdlet to connect to a session in which no commands are running or suspended, Receive-
PSSession connects to the session, but returns no output or errors.


For more information about the Disconnected Sessions feature, see about_Remote_Disconnected_Sessions.


This cmdlet is introduced in Windows PowerShell 3.0.