Powrshell: Show user info from groupmembers

Use the following powershell script to display the samaccount, name, mail information from all groupmembers. Also show if the account is enabled.

 

import-module activedirectory
Get-ADGroupMember “GROUP” | select samaccountname | %{Get-ADUser $_.samaccountname -Properties mail} | format-table samaccountname,name,mail,enabled

 

Leave a Reply

Your email address will not be published. Required fields are marked *