ReceivePSSessionCommand Members

This cmdlet connects a running command associated with a PS session and then directs the command output either: a) To Host. This is the synchronous mode of the cmdlet which won't return until the running command completes and all output data is received on the client. b) To a job object. This is the asynchronous mode of the cmdlet which will return immediately, providing the job object that is collecting the running command output data. The running command becomes disconnected when the associated runspace is disconnected (via the Disconnect-PSSession cmdlet). The associated runspace object must be in the Opened state (connected) before the running command can be connected. If the associated runspace object is in the disconnected state, it will first be connected before the running command is connected. The user can specify how command output data is returned by using the public OutTarget enumeration (Host, Job). The default actions of this cmdlet is to always direct output to host unless a job object already exists on the client that is associated with the running command. In this case, the existing job object is connected to the running command and returned. The cmdlet can be used in the following ways: Receive PS session data by session object > $session = New-PSSession serverName > $job1 = Invoke-Command $session { [script] } -asjob > Disconnect-PSSession $session > Connect-PSSession $session > Receive-PSSession $session // command output continues collecting at job object. Receive PS session data by session Id > Receive-PSSession $session.Id Receive PS session data by session instance Id > Receive-PSSession $session.InstanceId Receive PS session data by session Name. Direct output to job > Receive-PSSession $session.Name Receive a running command from a computer. > $job = Receive-PSSession -ComputerName ServerOne -Name SessionName -OutTarget Job

The following tables list the members exposed by the ReceivePSSessionCommand type.

  Name Description
public property AllowRedirection  
public property ApplicationName  
public property Authentication Uses basic authentication to authenticate the user.
public property CertificateThumbprint Specifies which certificate thumbprint to use for impersonating the user on the remote machine.
public property CommandOrigin  Gets the origin of the command. The command can be invoked within a runspace or it could be an external request (such as invoking the command from the command line). This property is introduced in Windows PowerShell 2.0. (Inherited from InternalCommand)
public property CommandRuntime  Gets and sets the command runtime object that controls what happens when the cmdlet writes an object to the pipeline. (Inherited from Cmdlet)
public property ComputerName The computer name to receive the session data from.
public property ConfigurationName  
public property ConnectionUri  
public property Credential Specifies the credentials of the user to impersonate in the remote machine. If this parameter is not specified, the credentials of the current user process will be assumed.
public property CurrentPSTransaction  Gets the latest transaction started by running the Start-Transaction cmdlet. This property is introduced in Windows PowerShell 2.0. (Inherited from Cmdlet)
public property Events  Gets the event manager for the current session where the cmdlet is running This property is introduced in Windows PowerShell 2.0. (Inherited from PSCmdlet)
public property Host  Gets information about the host that is being used by the session where the cmdlet is running. (Inherited from PSCmdlet)
public property Id Session Id of the PSSession object to receive data from.
public property InstanceId The instance Id of the PSSession object to receive data from.
public property InvokeCommand  Gets utility routines for executing scripts and creating script blocks. (Inherited from PSCmdlet)
public property InvokeProvider  Gets provider information that is used to access a data store. (Inherited from PSCmdlet)
public property JobManager  Gets or sets the job manager for the registered JobSourceAdapter objects. (Inherited from PSCmdlet)
public property JobName Provides the job name when the job is created for returned data.
public property JobRepository  Get the active jobs available in the current session where the cmdlet is running. This property is introduced in Windows PowerShell 2.0. (Inherited from PSCmdlet)
public property MyInvocation  Gets invocation information about the cmdlet. (Inherited from PSCmdlet)
public property Name Name of the PSSession object to receive data from.
public property OutTarget Determines how running command output is returned on the client.
public property PagingParameters  If the cmdlet declares paging support (via SupportsPaging), then PagingParameters property contains arguments of the paging parameters. Otherwise PagingParameters property is null. (Inherited from PSCmdlet)
public property ParameterSetName  Gets the name of the parameter set that is used by the cmdlet. (Inherited from PSCmdlet)
public property Port Specifies the alternate port to be used in case the default ports are not used for the transport mechanism (port 80 for http and port 443 for useSSL).
public property Session The PSSession object to receive data from.
public property SessionOption  
public property SessionState  Gets information about the current state of the current session where the cmdlet is running. (Inherited from PSCmdlet)
public property Stopping  Gets an indicator that the pipeline is stopping. The pipeline can be stopped for numerous reasons, such as when the user has entered the key combination CTRL+C, a terminating error has occurred, the hosting application requested a stop, and so on.  (Inherited from Cmdlet)
public property UseSSL This parameter suggests that the transport scheme to be used for remote connections is useSSL instead of the default http.Since there are only two possible transport schemes that are possible at this point, a SwitchParameter is being used to switch between the two.
Top

(see also Protected Methods)
 NameDescription
public methodCurrentProviderLocation  Returns the fully-qualified path of the current working directory for the specified provider. (Inherited from PSCmdlet)
public methodEquals  (Inherited from Object)
public methodGetHashCode  (Inherited from Object)
public methodGetResolvedProviderPathFromPSPath  Returns the resolved provider path from a specified Windows PowerShell path. (Inherited from PSCmdlet)
public methodGetResourceString  Gets a resource string that corresponds to the specified resource base key and identifier. (Inherited from Cmdlet)
public methodGetType  (Inherited from Object)
public methodGetUnresolvedProviderPathFromPSPath  Returns the fully-qualified provider path of a specified relative Windows PowerShell path. (Inherited from PSCmdlet)
public methodGetVariableValue  Overloaded. Returns the value of a specific session-state variable. The variants of this method can return a variable value with or without a default value. (Inherited from PSCmdlet)
public methodInvoke  Overloaded. Invokes a cmdlet object. The variants of this method can invoke a cmdlet that returns a collection of results or a strongly-typed enumerator. (Inherited from Cmdlet)
public methodShouldContinue  Overloaded. Requests confirmation of an operation from the user. This is typically a second query to the user. The variants of this method can send the query with or without providing yesToall or noToall options to the user. (Inherited from Cmdlet)
public methodShouldProcess  Overloaded. Requests confirmation from the user before an operation is performed. The variants of this method can be used to send the name of the resource to be changed, send the name of the resource and the operation to be performed, and more. The confirmation message that is displayed to the user is based on which variant of this method is called. (Inherited from Cmdlet)
public methodThrowTerminatingError  Reports a terminating error when the cmdlet cannot continue, or when you do not want the cmdlet to continue to process records. (Inherited from Cmdlet)
public methodToString  (Inherited from Object)
public methodTransactionAvailable  Determines whether the Start-Transaction cmdlet has been called and that there is a Windows PowerShell transaction available that the cmdlet can participate in. This method is introduced in Windows PowerShell 2.0. (Inherited from Cmdlet)
public methodWriteCommandDetail  Writes information to the execution log of the pipeline. (Inherited from Cmdlet)
public methodWriteDebug  Writes a debug message to the host. (Inherited from Cmdlet)
public methodWriteError  Reports a nonterminating error to the error pipeline when the cmdlet cannot process a record but can continue to process other records. (Inherited from Cmdlet)
public methodWriteObject  Overloaded. Writes an object to the output pipeline. The variants of this method can be used to write a single object or an object that can be enumerated. (Inherited from Cmdlet)
public methodWriteProgress  Writes a progress record to the host. (Inherited from Cmdlet)
public methodWriteVerbose  Writes a general user-level message to the pipeline. These messages can help describe what the cmdlet is doing. (Inherited from Cmdlet)
public methodWriteWarning  Writes a warning message that can be displayed. (Inherited from Cmdlet)
Top

  Name Description
protected method BeginProcessing  Overridden. Represents the override of the BeginProcess method of the derived cmdlet. This method is introduced in Windows PowerShell 2.0. (Inherited from Cmdlet)
protected method EndProcessing  Provides a one-time, post-processing functionality for the cmdlet. (Inherited from Cmdlet)
protected method Finalize  (Inherited from Object)
protected method MemberwiseClone  (Inherited from Object)
protected method ProcessRecord Overridden. Processes the input.
protected method ResolveAppName  (Inherited from PSRemotingCmdlet)
protected method ResolveComputerName  Resolves a single computer name supplied to the derived cmdlet. This method is introduced in Windows PowerShell 2.0. (Inherited from PSRemotingCmdlet)
protected method ResolveComputerNames  Resolves all the computer names supplied to the derived cmdlet. This method is introduced in Windows PowerShell 2.0. (Inherited from PSRemotingCmdlet)
protected method ResolveShell  (Inherited from PSRemotingCmdlet)
protected method StopProcessing Overridden. Indicates that the user has signaled a stop for this cmdlet.
Top


Show: