ComputerPrincipal Konstruktoren

Definition

Initialisiert eine neue Instanz der ComputerPrincipal-Klasse. Die Context-Eigenschaft muss vor dem Aufrufen Save()des Objekts festgelegt werden.

Überlädt

Name Beschreibung
ComputerPrincipal(PrincipalContext)

Initialisiert eine neue Instanz der ComputerPrincipal Klasse und weist sie dem angegebenen Kontext zu.

ComputerPrincipal(PrincipalContext, String, String, Boolean)

Initialisiert eine neue Instanz der ComputerPrincipal-Klasse mithilfe des angegebenen Kontexts, des SAM-Kontonamens, des Kennworts und des aktivierten Werts.

Hinweise

Das Computerprinzipalkonto wird beim Erstellen nicht beibehalten. Rufen Sie die Save Methode auf, um das Konto beizubehalten.

ComputerPrincipal(PrincipalContext)

Quelle:
Computer.cs
Quelle:
Computer.cs
Quelle:
Computer.cs
Quelle:
Computer.cs

Initialisiert eine neue Instanz der ComputerPrincipal Klasse und weist sie dem angegebenen Kontext zu.

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)

Parameter

context
PrincipalContext

Die PrincipalContext, die den Server oder die Domäne angibt, für den Vorgänge ausgeführt werden.

Hinweise

Das Computerprinzipalkonto wird beim Erstellen nicht beibehalten. Rufen Sie zum Speichern des Kontos die Save Methode auf.

Gilt für:

ComputerPrincipal(PrincipalContext, String, String, Boolean)

Quelle:
Computer.cs
Quelle:
Computer.cs
Quelle:
Computer.cs
Quelle:
Computer.cs

Initialisiert eine neue Instanz der ComputerPrincipal-Klasse mithilfe des angegebenen Kontexts, des SAM-Kontonamens, des Kennworts und des aktivierten Werts.

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)

Parameter

context
PrincipalContext

Die PrincipalContext, die den Server oder die Domäne angibt, für den Vorgänge ausgeführt werden.

samAccountName
String

Der SAM-Kontoname für diesen Computerprinzipal.

password
String

Das Kennwort für dieses Konto.

enabled
Boolean

Ein boolescher Wert, der angibt, ob das Konto aktiviert ist.

Hinweise

Das Computerprinzipalkonto wird beim Erstellen nicht beibehalten. Rufen Sie die Save Methode auf, um das Konto beizubehalten.

Gilt für: