Programming:Windows PowerShell

From WhyAskWhy.org Wiki
Revision as of 11:07, 13 September 2012 by Deoren (talk | contribs) (Added alternate (non-PowerShell) command)
Jump to: navigation, search



Look up Active Directory group members

I found this tip on ServerFault.com.

Import-Module ActiveDirectory
Get-ADGroupMember "MyADGroupName" | Select-Object name | Sort-Object name

Unfortunately that doesn't expand all group members, whereas this command-line tool does:

dsquery group -name "MyADGroupName" | dsget group -members -expand


Links