Solved

Retrieve GPO using Security Filtering Group via Powershell or Any Script

Posted on 2016-08-15
1
111 Views
Last Modified: 2016-08-17
Hello there,

We have a huge environment with tons of GPOs and would like to retrieve a GPO where security filtering (domain local) group is equal to "GROUP_A". What is the best way to do this?

I tried
$GPOs = Get-GPO -All -domain mycompany.com
Get-GPPermissions -domain mycompany.com -GUID. $GPO.Id -TargetName "MYCOMPANY\Group_A" -TargetType Group -ErrorAction SilentlyContinue

and it does not retrieve anything.

Any help would be greatly appreciated! Thanks!!
0
Comment
Question by:IT_Admin XXXX
1 Comment
 
LVL 40

Accepted Solution

by:
footech earned 500 total points
ID: 41756721
You would have to loop through the GPOs to retrieve the permissions for each.  Try something like the following:
$GPOs = Get-GPO -All -domain mycompany.com
foreach ( $GPO in $GPOs)
{
Get-GPPermissions -domain mycompany.com -GUID $GPO.Id -TargetName "MYCOMPANY\Group_A" -TargetType Group -ErrorAction SilentlyContinue
}

Open in new window

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Windows Server Update Service (WSUS) is free for everyone, but it lacks of some desirable features like send an e-mail to the administrator with the status of all computers on the WSUS server. This article is based on my PowerShell script …
"Migrate" an SMTP relay receive connector to a new server using info from an old server.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question