PrecreateComputer

Adds a computer to a zone.

Syntax

IComputer PrecreateComputer(DirectoryEntry adComputerEntry, string[] spn, DirectoryEntry trustee)

IComputer PrecreateComputer(DirectoryEntry containerEntry, string cn, string dnsName, string[] spn, DirectoryEntry trustee

IComputer PrecreateComputer(DirectoryEntry adComputerEntry, string[] spn, DirectoryEntry trustee, bool skipPermissionSetting);

IComputer PrecreateComputer(DirectoryEntry containerEntry, string cn, string dnsName, string[] spn, DirectoryEntry trustee, bool skipPermissionSetting);

Parameters

Specify the following parameters when using this method.

Parameter Description
adComputerEntry The DNS host name of the Active Directory computer object you wish to add to the zone.
containerEntry The Directory container for the created computer.
cn The computer name.
dnsName The DNS name of the created computer.
skipPermissionSetting Specifies if permission delegation is skipped when precreating computers.
spn Service Principal Name. Specify null to use default.
trustee The user or group to delegate adjoin permissions to, Specify null to delegate the permission for a self-service join.
trusteeDn The user or group to which the computer-level overrides will be assigned, specified as a distinguished name.

Return value

The computer object that is added to the zone.

Discussion

Use PrecreateComputer(DirectoryEntry, string[], DirectoryEntry) to add an existing Active Directory computer to the zone. Use PrecreateCompute(DirectoryEntry, string, string, string[], DirectoryEntry) to create a new UNIX computer object and add it to the zone.