ComputerPrincipal ComputerPrincipal ComputerPrincipal ComputerPrincipal Constructors

Definition

Overloads

ComputerPrincipal(PrincipalContext) ComputerPrincipal(PrincipalContext) ComputerPrincipal(PrincipalContext) ComputerPrincipal(PrincipalContext)

Initializes a new instance of the ComputerPrincipal class and assigns it to the specified context.

ComputerPrincipal(PrincipalContext, String, String, Boolean) ComputerPrincipal(PrincipalContext, String, String, Boolean) ComputerPrincipal(PrincipalContext, String, String, Boolean) ComputerPrincipal(PrincipalContext, String, String, Boolean)

Initializes a new instance of the ComputerPrincipal class by using the specified context, SAM account name, password, and enabled value.

Remarks

The computer principal account is not persisted when it is created. To persist the account, call the Save method.

ComputerPrincipal(PrincipalContext) ComputerPrincipal(PrincipalContext) ComputerPrincipal(PrincipalContext) ComputerPrincipal(PrincipalContext)

Initializes a new instance of the ComputerPrincipal class and assigns it to the specified context.

public:
 ComputerPrincipal(System::DirectoryServices::AccountManagement::PrincipalContext ^ context);
public ComputerPrincipal (System.DirectoryServices.AccountManagement.PrincipalContext context);
new System.DirectoryServices.AccountManagement.ComputerPrincipal : System.DirectoryServices.AccountManagement.PrincipalContext -> System.DirectoryServices.AccountManagement.ComputerPrincipal
Public Sub New (context As PrincipalContext)

Parameters

context
PrincipalContext PrincipalContext PrincipalContext PrincipalContext

The PrincipalContext that specifies the server or domain against which operations are performed.

Remarks

The computer principal account is not persisted when it is created. To save the account, call the Save method.

ComputerPrincipal(PrincipalContext, String, String, Boolean) ComputerPrincipal(PrincipalContext, String, String, Boolean) ComputerPrincipal(PrincipalContext, String, String, Boolean) ComputerPrincipal(PrincipalContext, String, String, Boolean)

Initializes a new instance of the ComputerPrincipal class by using the specified context, SAM account name, password, and enabled value.

public:
 ComputerPrincipal(System::DirectoryServices::AccountManagement::PrincipalContext ^ context, System::String ^ samAccountName, System::String ^ password, bool enabled);
public ComputerPrincipal (System.DirectoryServices.AccountManagement.PrincipalContext context, string samAccountName, string password, bool enabled);
new System.DirectoryServices.AccountManagement.ComputerPrincipal : System.DirectoryServices.AccountManagement.PrincipalContext * string * string * bool -> System.DirectoryServices.AccountManagement.ComputerPrincipal
Public Sub New (context As PrincipalContext, samAccountName As String, password As String, enabled As Boolean)

Parameters

context
PrincipalContext PrincipalContext PrincipalContext PrincipalContext

The PrincipalContext that specifies the server or domain against which operations are performed.

samAccountName
String String String String

The SAM account name for this computer principal.

password
String String String String

The password for this account.

enabled
Boolean Boolean Boolean Boolean

A Boolean value that specifies whether the account is enabled.

Remarks

The computer principal account is not persisted when it is created. To persist the account, call the Save method.

Applies to