Link to home
Start Free TrialLog in
Avatar of nav2567
nav2567Flag for United States of America

asked on

GETADUSER

Hi,

I need to run the below script for an application vendor.  Can someone explain what the following command does?  I know the script will harvest information such as email address, title and so on in active directory but I would like to understand the detail.

Our users in AD are mostly in the USER container and there are some other groups scattered in other OUs.  Should I run the below in ourdomain.com?  If yes, do I need to specify or it will run from ourdomain.com by default?

Please advise.  Many thanks.

Get-ADUser –LDAPFilter "(&(objectCategory=person)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2) (mail=*))" -Properties OfficePhone,EmailAddress,Title,Office,Department,Description,Manager | Set-Custodian -Company <company>
ASKER CERTIFIED SOLUTION
Avatar of Bradley Fox
Bradley Fox
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial