PSSession.Create(Runspace, String, PSCmdlet) Method
Definition
Important
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.
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).
public static System.Management.Automation.Runspaces.PSSession Create (System.Management.Automation.Runspaces.Runspace runspace, string transportName, System.Management.Automation.PSCmdlet psCmdlet);
static member Create : System.Management.Automation.Runspaces.Runspace * string * System.Management.Automation.PSCmdlet -> System.Management.Automation.Runspaces.PSSession
Public Shared Function Create (runspace As Runspace, transportName As String, psCmdlet As PSCmdlet) As PSSession
Parameters
- runspace
- Runspace
Runspace for the new PSSession.
- transportName
- String
Optional transport name.
- psCmdlet
- PSCmdlet
Optional cmdlet associated with the PSSession creation.