Works fine for me on locked objects.
Did you try the example script for _AD_IsObjectLocked? It first gets a list of locked objects and then uses _AD_IsObjectLocked on the first found object.
Or run _AD_GetObjectsLocked.au3 to get a list of all locked objects and check if your object is included.
Did you test the @error returned by _AD_IsObjectLocked in your script?; Return values .: Success - 1, Specified object is locked ; Failure - 0, sets @error to: ; |0 - $sAD_Object is not locked ; |1 - $sAD_Object could not be found
If you check a computer remember to append a "$" to the samaccountname - see the remarks in the helpfile for _AD_IsObjectLocked.
yes i tried the expample. It doesn't work.
_AD_GetObjectsLocked.au3 return "no objects locked".
I try this function on user account and it return 0 and @error is always at 0 too whereas the account is really locked.
_AD_UnlockObject works fine.
I don't know where to search.
Thx for your help