Same goes for this request, retrieve the members from an AD group and display the username, displayname and emailaddress and export it to a file:
$groupname = "AD group name" Get-ADGroupmember $groupname | %{get-aduser $_.samaccountname -properties cn,samaccountname,emailaddress | select cn,samaccountname,emailaddress | Out-File c:\temp\output.txt
No comments:
Post a Comment