Solved

Retrieve GPO using Security Filtering Group via Powershell or Any Script

Posted on 2016-08-15
1
42 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 39

Accepted Solution

by:
footech earned 500 total points
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

How to sign a powershell script so you can prevent tampering, and only allow users to run authorised Powershell scripts
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now