Solved

Retrieve a Specific GPO Permission from a set of GUIDs

Posted on 2016-08-17
1
38 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
[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 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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

705 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