InitialSessionState.CreateRestricted 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);
Parameters
sessionCapabilities
SessionCapabilities

What capabilities the session should have.

Returns