PowerShell Script of the Week: July 20th 2015 – Edit Permission on multiple GPOs on your domain.

Published by Jose on

Simple Script that came in hand today:

$GPOs = get-content C:\1\gpos.txt
Foreach ($GPO in $GPOs)
Set-GPPermissions -Name $GPO -TargetName “Domain Admins” -TargetType Group -PermissionLevel GpoEdit

The “gpos.txt” located at C:\1\gpos.txt contains:

Test-Lab-Win7 Building1
Test-Lab-Win7 Building2
Test-Lab-Win7 Building3
Test-Lab-Win7 Building4
Test-Lab-Win7 Building5
Categories: Uncategorized


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *