ComputerPrincipal Constructors
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.
Initializes a new instance of the ComputerPrincipal class. The Context property must be set on the object prior to calling Save().
Overloads
ComputerPrincipal(PrincipalContext) |
Initializes a new instance of the ComputerPrincipal class and assigns it to the specified context. |
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)
- Source:
- Computer.cs
- Source:
- Computer.cs
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
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.
Applies to
ComputerPrincipal(PrincipalContext, String, String, Boolean)
- Source:
- Computer.cs
- Source:
- Computer.cs
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
The PrincipalContext that specifies the server or domain against which operations are performed.
- samAccountName
- String
The SAM account name for this computer principal.
- password
- String
The password for this account.
- enabled
- 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.