Active Directory related functions


These are the functions available in the AD.asmx file of the webservice:

AddComputerToGroup (Groupname, Computername_)
Adds a computer to the specified Active Directory Group

CopyComputer (SourceComputerName, TargetComputerName, TargetPath, PropertiesToCopy)
Creates a copy of an existing computer account with all specified properties. TargetPath and PropertiesToCopy are optional. On default it will copy the description, the group memberships and the “userAccountControl” that holds certain information about account type etc. If you supply your own properties make sure to include at least the userAccountControl as well. Otherwise you will experience some “interesting” behaviour.

DoesComputerExist (Computername)
Check if a computer exists in Active Directory

GetADSite ()
Returns the Active Directory site for the IP Address of the Requester

GetADSiteByIPAddress (IPAddress)
Return the Active Directory site for the IPAddress

GetADSites ()
Returns a list of all Active Directory Sites

GetComputerAttribute (Computername, Attribute)
Returns the specified attribute for the computer.

GetComputerDescription (Computername)
Returns the Description of the computer

GetComputerNameByNetbootGuid (netbootGUID)
Returns the name of a computer for the netbootGuid

GetComputerNetbootGuid (Computername)
Returns the netbootGuid for the computer

GetComputerParentPath (ComputerName)
Returns the LDAP path to the parent object of the computer. (Can be helpfull to save the current OU of a computer at the beginning of a deployment)

GetDomains ()
Returns a list of all Active Directory Domains in the Forest

GetForest ()
Returns information about the Forest

GetGroupMemberNames (Groupname)
Returns a list of Group members with their name (cn)

GetGroupMembers (Groupname)
Returns a list of Group Members with their distinguished name

GetOUs (ParentPath, Level)
Returns a list of OUs within the specified Path. "" will use the Domain Root as Parent Path, Level 0 = only direct child OUs

GetObjectName (ObjectDN)
Returns the name (cn) of an Active Directory object defined by the distinguished name

GetSCCMAssignedSite ()
Returns the SCCM Assigned Site for the IP Address of the Requester

GetSCCMAssignedSiteByIPAddress (IPAddress)
Returns the SCCM Assigned Site for the IP Address

GetSCCMServerLocatorPoints ()
Returns a list of configured SCCM Server Locator Points

GetSCCMSite ()
Returns the SCCM Site for the IP Address of the Requester

GetSCCMSiteByIPAddress (IPAddress)
Returns the SCCM Site for the IP Address

GetSCCMSiteServer ()
Returns the SCCM Default Management Point for the supplied site code

MoveComputerToOU (Computername, OUPath)
Moves the computer to the specified OU

RemoveComputerFromGroup (Computername, Groupname)
Removes a computer from the specified Active Directory Group

SetComputerDescription (Computername, ComputerDescription)
Sets the description of a computer

SetComputerNetbootGuid (Computername, netbootGuid)
Sets the netbootGuid of a computer

Additionally there are some functions which you can make available if necessary. On default they are not accessible as they can harm your environment. So be sure you know what you are doing before enabling them. To enable those functions, rename the file ADExt.asm_ in your Webservice root directory into ADExt.asmx. After that you have the following functions available:

DeleteComputer (Computername)
Deletes a computer from Active Directory

SetComputerAttribute (Computername, Attribute, Value)
Sets the specified attribute for a computer.

Last edited Aug 12, 2010 at 9:29 AM by MaikKoster, version 11

Comments

No comments yet.