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
Solved

Retrieve a Specific GPO Permission from a set of GUIDs

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

How to sign a powershell script so you can prevent tampering, and only allow users to run authorised Powershell scripts
Synchronize a new Active Directory domain with an existing Office 365 tenant
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

829 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