GetComputerByPath
Returns a computer object with all of its related IBM Security-specific data, including all of the Computer object’s properties and methods.
Syntax
IComputer GetComputerByPath(string path)
Parameter
Specify the following parameter when using this method:
Parameter | Description |
---|---|
path
|
The LDAP path or distinguished name of the computer object you want to retrieve. |
Return value
The computer object as:
Centrify.DirectControl.API.IComputer
Discussion
This method returns the computer object using the LDAP path or distinguished name of the object. The LDAP path to a computer account uses the following format:
LDAP://[domain/]attr=name,[...],dc=domain_part,[...]
For example, if you use the default parent location for computer accounts in the domain arcade.com
, the LDAP path for the computer account magnolia
is:
LDAP://cn=magnolia,cn=Computers,dc=arcade,dc=com
The method returns the computer object as Centrify.DirectControl.API.IComputer
.
Exceptions
GetComputerByPath
throws an ArgumentException
if the computer path is null
or
empty.
Example
The following code sample illustrates using this method in a script:
...
'Specify the zone you want to work with
Set objZone = cims.GetZone("ajax.org/UNIX/Zones/east_div”)
'Identify the computer you want to work with
Set objComputer = cims.GetComputerByPath("LDAP://cn=magnolia,
cn=computers,dc=ajax,dc=org”)
...