Sometimes you may want to get all of the properties associated with an active directory user. This can be easily done using PowerShell. Here's the script:
-f is the filter
sn is the LDAP "sirname" or last name
-eq means equal to
-properties sets what properties you want about the user
* indicates that you want all of the properties for the selected user
If you want to search by first name, use the following script:
Get-AdUser -f {sn -eq 'name'} -properties * | Get-MemberWhere:
-f is the filter
sn is the LDAP "sirname" or last name
-eq means equal to
-properties sets what properties you want about the user
* indicates that you want all of the properties for the selected user
If you want to search by first name, use the following script:
Get-AdUser -f {GivenName -eq 'name'} -properties * | Get-MemberReferences
No comments:
Post a Comment