InitialSessionState.CreateRestricted(SessionCapabilities) Method

Definition

Creates an InitialSessionState instance that exposes only the minimal set of commands needed by give set of sessionCapabilities All commands that are not needed are made private in order to minimize the attack surface.

public:
 static System::Management::Automation::Runspaces::InitialSessionState ^ CreateRestricted(System::Management::Automation::SessionCapabilities sessionCapabilities);
public static System.Management.Automation.Runspaces.InitialSessionState CreateRestricted (System.Management.Automation.SessionCapabilities sessionCapabilities);
static member CreateRestricted : System.Management.Automation.SessionCapabilities -> System.Management.Automation.Runspaces.InitialSessionState
Public Shared Function CreateRestricted (sessionCapabilities As SessionCapabilities) As InitialSessionState

Parameters

sessionCapabilities
SessionCapabilities

What capabilities the session should have.

Returns

InitialSessionState

Applies to