Solved

Retrieve a Specific GPO Permission from a set of GUIDs

Posted on 2016-08-17
1
37 Views
Last Modified: 2016-08-24
Hi Powershell gurus,

I have been back and forth with this and has been unsuccessful. Could someone please shed some light and provide assistance, it would be greatly greatly appreciated.

I need to find out if DOMAIN\Group 1 permissions exists from a group of GUIDs (guid.txt) and error if it does not exist.

Thank you!
0
Comment
Question by:IT_Admin XXXX
1 Comment
 
LVL 40

Accepted Solution

by:
footech earned 500 total points
ID: 41759569
It's almost exactly like your last.  Just don't have the -ErrorAction parameter set to SilentlyContinue (or the $ErrorActionPreference variable) and the error will display.
$GPOs = Get-Content "guid.txt"
foreach ( $GPO in $GPOs )
{
    Get-GPPermissions -domain mycompany.com -GUID $GPO -TargetName "MYCOMPANY\Group_A" -TargetType Group
}

Open in new window

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Synchronize a new Active Directory domain with an existing Office 365 tenant
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
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…

726 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