您的位置:首页 > 其它

Export Active Active Directory Users into CSV

2013-05-23 09:12 381 查看
hat’s not a typo. Export only active Active Directory users (not disabled) into a csv file with csvde, the following should suite your needs:
1
# Collect Internal users for your audit purposes
2
csvde -d "OU=Users,OU=Internal,DC=DomainName,DC=Suffix" -r "(&(objectCategory=person)(!UserAccountControl=66050)(!UserAccountControl=514))" -l SAMAccountName,name,description,UserAccountControl,logonHours -f "InternalUsers.csv"
You can easily put this into task scheduler for automated reporting at whatever interval you like. I’m currently running this manually every 1st of the month but I will definitely be looking into automating and emailing myself, or directly to the person who needs the report. If anyone knows how to get rid of the DN field in the output, please let me know.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Export Active