AuthorizationManager Class
Definition
Important
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.
Defines the base class for an authorization manager of a Runspace.
An authorization manager helps a host control and restrict the execution of commands. For each of the command types listed in the CommandTypes enumeration, the engine requests permission from the AuthorizationManager to run the command.
Extending this class requires that you override the ShouldRun method with the logic specific to your needs. The base class gives permission to run every command. The default Microsoft.PowerShell.PSAuthorizationManager provides a customized and much more complete authorization policy.
public ref class AuthorizationManager
public class AuthorizationManager
type AuthorizationManager = class
Public Class AuthorizationManager
- Inheritance
-
AuthorizationManager
- Derived
Constructors
AuthorizationManager(String) |
Creates an instance of authorization manager using specified shellID. |
Methods
ShouldRun(CommandInfo, CommandOrigin, PSHost, Exception) |
Determines if the host should run the command a specified by the CommandInfo parameter. The default implementation gives permission to run every command. |