AddComputer

Adds a computer object to a specific zone.

Syntax

IComputer AddComputer(IADs computer, IZone zone)

IComputer AddComputer(string computerDn, IZone zone)

Parameters

Specify one of the following parameters when using this method.

Parameter Description
computer The Active Directory computer object that you wish to add to the zone.
computerDn The distinguished name of the computer object.

Specify the following parameter when using this method.

Parameter Description
zone The zone to which you wish to add the computer object.

Return value

The newly-added computer object.

Exceptions

AddComputer throws an ArgumentNullException if any parameter value is null or empty.