31 August,2021 by Tom Collins
Question : How can I find the Active Directory Group group scope - Local Domain, Global Group, Universal Group with Powershell?
Answer: Powershell has a range of cmdlets to access and read the Active Directory . One of the Powershell cmdlets is Get-ADGroup - which retrieves a group or groups from Active Directory.
This is an example of returning all the columns for all AD groups on a specific server , where the string "DBA Team" is part of the AD group name
Get-ADGroup -Filter "name -like '*DBA Team*'" -Properties * -server "myADserver.net" | select *
As part of the resultset - there is a column called "Group Scope" . This "GroupScope" column returns the values required - Local Domain, Global Group, Universal Group.
To return only the relevant columns i.e name and group scope use something similar to the below
Get-ADGroup -Filter "name -like '*DBA Team*'" -Properties * -server "myADserver.net" | select name,groupscope
Read more on Active Directory AD group
How to find Active Directory users with Get-ADUser search filter
How to get DOMAIN login name with Powershell Get-ADGroupMember
How to Export Active Directory Group Members with Powershell Get-ADGroupMember
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |