InternalTestHooks.GetCustomPSSenderInfo(String, Version) Method

Definition

Constructs a custom PSSenderInfo instance that can be assigned to $PSSenderInfo in order to simulate a remoting session with respect to the $PSSenderInfo.ConnectionString (connection URL) and $PSSenderInfo.ApplicationArguments.PSVersionTable.PSVersion (the remoting client's PowerShell version). See Get-FormatDataTest.ps1.

public static System.Management.Automation.Remoting.PSSenderInfo GetCustomPSSenderInfo (string url, Version clientVersion);
static member GetCustomPSSenderInfo : string * Version -> System.Management.Automation.Remoting.PSSenderInfo
Public Shared Function GetCustomPSSenderInfo (url As String, clientVersion As Version) As PSSenderInfo

Parameters

url
String

The connection URL to reflect in the returned instance's ConnectionString property.

clientVersion
Version

The version number to report as the remoting client's PowerShell version.

Returns

The newly constructed custom PSSenderInfo instance.

Applies to