Skip to content

Instantly share code, notes, and snippets.

@ddhahn
Created February 1, 2013 16:52
Show Gist options
  • Save ddhahn/4692533 to your computer and use it in GitHub Desktop.
Save ddhahn/4692533 to your computer and use it in GitHub Desktop.
Add a Computers directly to a GPO ACL with Read and Apply permissions. May be useful for ad-hoc testing of GPO's
$names = Get-Content c:\temp\gpolist.txt
foreach ($name in $names) {
set-gppermissions -name "GPOName" -permissionlevel gpoRead -targetname "$name" -targettype computer
set-gppermissions -name "GPOName" -permissionlevel gpoapply -targetname "$name" -targettype computer
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment