?
Solved

Retrieve GPO using Security Filtering Group via Powershell or Any Script

Posted on 2016-08-15
1
Medium Priority
?
267 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 40

Accepted Solution

by:
footech earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

777 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