Active Directory UDF - GetObjectProperties: Difference between revisions

From AutoIt Wiki
Jump to navigation Jump to search
(Created page for _AD_GetObjectProperties)
 
No edit summary
Line 1: Line 1:
{{WIP}}
Function _AD_GetObjectProperties returns all or just the specified properties of an object in "decoded" (readable) form.
Function _AD_GetObjectProperties returns all or just the specified properties of an object in "decoded" (readable) form.


If you ask the function to return all properties of an object it does not return "constructed attributes" ("virtual attributes"). Most of this "constructed attributes" get calculated dynamically at run time.
If you ask the function to return all properties of an object it does not return "constructed attributes" ("virtual attributes"). Most of this "constructed attributes" get calculated dynamically at run time by the LDAP server and are not actually part of the LDAP Entry.
 
==Remarks==
* ...


==Examples==
==Examples==
List all Group Policies:<syntaxhighlight lang="autoit">
Return the password expiration date/time when fine grained password policy ("FGPP") is active.<syntaxhighlight lang="autoit">
$aObjects = _AD_GetObjectsInOU("", "(objectClass=groupPolicyContainer)", 2, "displayName,gPCFileSysPath")
$aObjects = _AD_GetoObjectProperties(@username, "MSDS-UserPasswordExpiryTimeComputed") ; Returns the password expiration date/time using the constructed attribute
$aObjects = _AD_GetoObjectProperties(@username, "") ; Returns all static attributes, so the password expiration date/time (when FGPP is used) is missing
</syntaxhighlight>
</syntaxhighlight>


[[Category:UDF]]
[[Category:UDF]]

Revision as of 13:38, 1 April 2018

Function _AD_GetObjectProperties returns all or just the specified properties of an object in "decoded" (readable) form.

If you ask the function to return all properties of an object it does not return "constructed attributes" ("virtual attributes"). Most of this "constructed attributes" get calculated dynamically at run time by the LDAP server and are not actually part of the LDAP Entry.

Examples

Return the password expiration date/time when fine grained password policy ("FGPP") is active.

$aObjects = _AD_GetoObjectProperties(@username, "MSDS-UserPasswordExpiryTimeComputed") ; Returns the password expiration date/time using the constructed attribute
$aObjects = _AD_GetoObjectProperties(@username, "") ; Returns all static attributes, so the password expiration date/time (when FGPP is used) is missing