Session State. Create Restricted(SessionCapabilities) Method
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 an InitialSessionState instance that exposes only the minimal
set of commands needed by give set of
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
What capabilities the session should have.