Represents an authorization manager for a runspace.
Namespace: System.Management.Automation
Assembly: System.Management.Automation (in system.management.automation.dll)
Dim instance As AuthorizationManager
Public Class AuthorizationManager
public class AuthorizationManager
public ref class AuthorizationManager
public class AuthorizationManager
public class AuthorizationManager
The authorization manager helps control the execution of commands for the runspace. The Windows PowerShell runtime requests permission from the authorization manager to run the command types defined by the CommandTypes enumeration. The default implementation of this class gives permission for the runspace to run all types of commands.
When deriving from this class to create your own authorization policy, be sure to do the following:
Override the ShouldRun method with the logic specific to your needs.
Whenever your authorization policy blocks a command, set the reason parameter of the ShouldRun method with an exception object that describes why the command was blocked.
The PSAuthorizationManager class defines the authorization manager provided by Windows PowerShell.
System.Object
System.Management.Automation.AuthorizationManager
Microsoft.PowerShell.PSAuthorizationManager
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Development Platforms
Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, Windows 7, Windows 2008 R2 Target Platforms
Windows Server 2008, Windows Server 2003, Windows Vista, Windows XP, Windows 7, Windows 2008 R2