Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

Get all users in AD Group

$
0
0

Hello.

Iam using this powershell command to list the users in a ad group

Get-ADGroupMember -Identity "Group name" | foreach-object { Write-Host $_.SamAccountName }

and it seems to work just fine.

Here is the problem, i have a group that had no members, i added some members to that group and then i did run this command but it still does not show the users, if i run it on groups that already have members then it list the members.

Does it for some reason takes time before it will show up after that i added users?

Iam running this powershell on the domain controller.


Viewing all articles
Browse latest Browse all 2562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>