Monday, June 11, 2018

[Snippet]: Fetch User Name and Email Address from Windows AD Group using Powershell script.

FetchAdUsers.ps1

#Store users' info in CSV

Get-ADGroupMember -Identity GROUPNAME -Recursive|Get-ADUser -Properties Mail, MemberOf | Select-Object GivenName, Surname, SamAccountName, Mail  | Export-csv -path GROUPNAME .csv -NoTypeInformation


0 comments :

Post a Comment

 

© 2011 GIS and Remote Sensing Tools, Tips and more .. ToS | Privacy Policy | Sitemap

About Me