Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

InitialSessionState.CreateRestricted Method (SessionCapabilities)

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Creates an InitialSessionState object that can be used to create sessions whose Windows PowerShell commands are restricted based on the capabilities of the session. This method is introduced in Windows PowerShell 2.0.

Namespace:   System.Management.Automation.Runspaces
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

public static InitialSessionState CreateRestricted(
	SessionCapabilities sessionCapabilities
)

Parameters

sessionCapabilities
Type: System.Management.Automation.SessionCapabilities

A SessionCapabilities constant that specifies the capabilities of the session, such as whether the session can be used for implicit and interactive remoting.

Return Value

Type: System.Management.Automation.Runspaces.InitialSessionState

Returns an InitialSessionState object that is used to create sessions whose Windows PowerShell commands are restricted based on the capabilities of the session.

Creating a session whose commands are restricted based on session capabilities does not guarantee that those commands are available. The InitialSessionState object returned by this method guarantees only that when the command is run, its restricted functionality is all that is available.

Return to top

Community Additions

Show: