Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Class that exposes read only properties and which conveys information about a remote runspace object to the user. The class serves the following purpose: 1. Exposes useful information to the user as properties 2. Shields the remote runspace object from directly being exposed to the user. This way, the user will not be able to directly act upon the object, but instead will have to use the remoting cmdlets. This will prevent any unpredictable behavior.
public ref class PSSession sealed
public sealed class PSSession
type PSSession = class
Public NotInheritable Class PSSession
Private data to be used by applications built on top of PowerShell. Optionally sent by the remote server when creating a new session / runspace.
Indicates whether the specified runspace is available for executing commands.
Name of the computer target.
Type of the computer target.
Shell which is executed in the remote machine.
Id of the container target.
SessionId of this runspace. This is unique only across a session.
InstanceID that identifies this runspace.
Friendly name for identifying this runspace.
The remote runspace object based on which this information object is derived.
Name of the transport used.
Guid of the virtual machine target.
Name of the virtual machine target.
|Create(Runspace, String, PSCmdlet)||
Creates a PSSession object from the provided remote runspace object. If psCmdlet argument is non-null, then the new PSSession object is added to the session runspace repository (Get-PSSession).
ToString method override.