Zone
Gets or sets the zone object associated with the computer object.
Syntax
IZone Zone {get; set;}
Property value
The zone object for the zone of the computer account.
Discussion
Each computer object can only be associated with one zone: the zone used to join the computer to its Active Directory domain. This property gets or sets the zone object for the zone to which the computer is currently joined.
Exceptions
Zone
may throw one of the following exceptions:
-
ApplicationException
if the zone you specify isnull
, an unsupported type, or already in use; or if you were trying to move the computer object to a new domain and the operation failed. -
InvalidOperationException
if the computer is not zoned.
Example
The following code sample illustrates using Zone
for a computer object in a
script:
...
set objZone = cims.GetZoneByPath("LDAP://CN=research,CN=zones,
CN=centrify,CN=program data,DC=sierra,DC=com")
'Identify the computer account
Set objComp = cims.GetComputerByPath("LDAP://CN=aixserver,
CN=computers,DC=sierra,DC=com”)
‘Display the zone name
wScript.Echo objComp.Zone.Name
...