Condividi tramite


PSPrincipal Class

Definition

Defines the basic functionality of a PSPrincipal object.

public ref class PSPrincipal sealed : System::Security::Principal::IPrincipal
public sealed class PSPrincipal : System.Security.Principal.IPrincipal
type PSPrincipal = class
    interface IPrincipal
Public NotInheritable Class PSPrincipal
Implements IPrincipal
Inheritance
PSPrincipal
Implements

Constructors

PSPrincipal(PSIdentity, WindowsIdentity)

Constructs PSPrincipal using PSIdentity and a WindowsIdentity.

Properties

Identity

Gets the identity of the current user principal.

WindowsIdentity

Gets the WindowsIdentity (if possible) representation of the current Identity. PSPrincipal can represent any user for example a LiveID user, network user within a domain etc. This property tries to convert the Identity to WindowsIdentity using the user token supplied.

Methods

IsInRole(String)

Determines if the current principal belongs to a specified rule. If we were able to get a WindowsIdentity then this will perform the check using the WindowsIdentity otherwise this will return false.

Explicit Interface Implementations

IPrincipal.Identity

Gets the identity of the current principal.

Applies to