Freigeben über


InitialSessionState.CreateFromSessionConfigurationFile Method

Definition

Overloads

CreateFromSessionConfigurationFile(String, Func<String,Boolean>, Boolean)

Creates an initial session state from a PSSC configuration file.

CreateFromSessionConfigurationFile(String)

Creates an initial session state from a PSSC configuration file.

CreateFromSessionConfigurationFile(String, Func<String,Boolean>)

Creates an initial session state from a PSSC configuration file.

CreateFromSessionConfigurationFile(String, Func<String,Boolean>, Boolean)

Creates an initial session state from a PSSC configuration file.

public static System.Management.Automation.Runspaces.InitialSessionState CreateFromSessionConfigurationFile (string path, Func<string,bool> roleVerifier, bool validateFile);
static member CreateFromSessionConfigurationFile : string * Func<string, bool> * bool -> System.Management.Automation.Runspaces.InitialSessionState
Public Shared Function CreateFromSessionConfigurationFile (path As String, roleVerifier As Func(Of String, Boolean), validateFile As Boolean) As InitialSessionState

Parameters

path
String

The path to the PSSC session configuration file.

roleVerifier
Func<String,Boolean>

The verifier that PowerShell should call to determine if groups in the Role entry apply to the target session. If you have a WindowsPrincipal for a user, for example, create a Function that checks windowsPrincipal.IsInRole().

validateFile
Boolean

Validates the file contents for supported SessionState options.

Returns

InitialSessionState object.

Applies to

CreateFromSessionConfigurationFile(String)

Creates an initial session state from a PSSC configuration file.

public:
 static System::Management::Automation::Runspaces::InitialSessionState ^ CreateFromSessionConfigurationFile(System::String ^ path);
public static System.Management.Automation.Runspaces.InitialSessionState CreateFromSessionConfigurationFile (string path);
static member CreateFromSessionConfigurationFile : string -> System.Management.Automation.Runspaces.InitialSessionState
Public Shared Function CreateFromSessionConfigurationFile (path As String) As InitialSessionState

Parameters

path
String

The path to the PSSC session configuration file.

Returns

InitialSessionState object.

Applies to

CreateFromSessionConfigurationFile(String, Func<String,Boolean>)

Creates an initial session state from a PSSC configuration file.

public:
 static System::Management::Automation::Runspaces::InitialSessionState ^ CreateFromSessionConfigurationFile(System::String ^ path, Func<System::String ^, bool> ^ roleVerifier);
public static System.Management.Automation.Runspaces.InitialSessionState CreateFromSessionConfigurationFile (string path, Func<string,bool> roleVerifier);
static member CreateFromSessionConfigurationFile : string * Func<string, bool> -> System.Management.Automation.Runspaces.InitialSessionState
Public Shared Function CreateFromSessionConfigurationFile (path As String, roleVerifier As Func(Of String, Boolean)) As InitialSessionState

Parameters

path
String

The path to the PSSC session configuration file.

roleVerifier
Func<String,Boolean>

The verifier that PowerShell should call to determine if groups in the Role entry apply to the target session. If you have a WindowsPrincipal for a user, for example, create a Function that checks windowsPrincipal.IsInRole().

Returns

InitialSessionState object.

Applies to