- Can I copy an ACL from one registry key to another in PowerShell 2.0
- $acl = get-acl -path hkcu:softwarefoo
- $r = $acl.GetAccessRules( $true, $true, [security.principal.ntaccount] )
- $acl.RemoveAccessRuleAll( $r[0] )
- $acl.AddAccessRule( $r[0] )
- set-acl -path hkcu:softwarebar -aclobject $acl