Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Retrieve GPO using Security Filtering Group via Powershell or Any Script

Posted on 2016-08-15
1
Medium Priority
?
356 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 41

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

1

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

This article will help you understand what HashTables are and how to use them in PowerShell.
My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonstā€¦
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ā€¦

596 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