Commits any changes or updates to the computer object and saves the changes to Active Directory.


void Commit()


When you use this method, it checks and validates the computer properties before saving the object in Active Directory. For example, before saving, the method validates that the computer name doesn’t exceed the maximum length or contain invalid characters.


Commit may throw one of the following exceptions:

  • ApplicationException if the changes you are attempting to save contain one or more errors.
  • COMException if an LDAP error occurs. LDAP errors can occur if the connection to the LDAP server fails, the connection times out, invalid credentials are presented, or there are other problems communicating with Active Directory.
  • InvalidOperationException if the computer profile cannot be found. This usually indicates that the computer is not in a zone.
  • UnauthorizedAccessException if there are insufficient permissions to commit the Active Directory computer account object.


The following code sample illustrates using Commit for a computer object in a script:

set objZone = cims.GetZone("")
'Identify the computer account
Set objComp = cims.GetComputer("”) 
'Set a property and save the changes to the computer account
Set objComp.WebSphereEnabled = true