CommandMetadata.GetRestrictedCommands Method (SessionCapabilities)
Updated: April 27, 2016
Applies To: Windows PowerShell
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.
Assembly: System.Management.Automation (in System.Management.Automation.dll)
public static Dictionary<string, CommandMetadata> GetRestrictedCommands( SessionCapabilities sessionCapabilities )
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.