Daniel Little Coding Blog
Daniel Little Coding Blog

A blog about .net development and the web.

Daniel Little
Author

Daniel Little (lavinski) is a Brisbane based software developer.

Share


Our Newsletter


Like this blog? Get each new post as soon it's posted.

Tags


Twitter


Querying AD Groups with PowerShell

Daniel LittleDaniel Little

Getting the list of the AD groups if nice and easy in PowerShell. All the CmdLets are located in the ActiveDirectory module which you might not have installed on your system.

To install the module you'll need these Windows features

Add-WindowsFeature RSAT-AD-PowerShell, RSAT-AD-AdminCenter

Then you can import the module

Import-Module ActiveDirectory

Then query the user you want to see the groups for. This command can also list the groups for other groups in case of inheritance.

Get-ADPrincipalGroupMembership "username" | select name
Daniel Little
Author

Daniel Little

Daniel Little (lavinski) is a Brisbane based software developer.

Comments