CommandMetadata.GetRestrictedCommands Method

Retrieves information about how Windows PowerShell commands are restricted based on the capabilities of the session, such as sessions used for implicit and interactive remoting.


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

'Usage
Dim sessionCapabilities As SessionCapabilities
Dim returnValue As Dictionary(Of String, CommandMetadata)

returnValue = CommandMetadata.GetRestrictedCommands(sessionCapabilities)

public static Dictionary<string,CommandMetadata> GetRestrictedCommands (
	SessionCapabilities sessionCapabilities
)
public static Dictionary<String,CommandMetadata> GetRestrictedCommands (
	SessionCapabilities sessionCapabilities
)
public static function GetRestrictedCommands (
	sessionCapabilities : SessionCapabilities
) : Dictionary<String,CommandMetadata>

Parameters

SessionCapabilities

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

Return Value

Returns a Dictionary object that contains information about how Windows PowerShell-provided commands are restricted based on the capabilities of the session.

For example, implicit remoting does not use all the parameters of the Get-Help cmdlet, and uses only a limited set of argument values for the Get-Help parameters that it does use.

The CreateRestricted method is used to define the initial session-state for sessions whose commands are restricted based on session capabilities; however it 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.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

 

Target Platforms

Windows Developer Preview, Windows Server Developer Preview

Send comments about this topic to Microsoft.
Show:
© 2014 Microsoft