Quantcast
Channel: SQLServerCentral » Programming » Powershell » Latest topics
Viewing all articles
Browse latest Browse all 467

List all ADGroups and all their Users

$
0
0
ForEach ($Group in (Get-Content c:\text.txt)) { Get-ADGroupMember $Group | Select @{Label="Group";Expression={$Group.Name}},Name,SamAccountName }

I have the above piece of powershell code which displays Group,name and samaccountname in the w

Viewing all articles
Browse latest Browse all 467

Trending Articles