gyurisc
gyurisc

Reputation: 11492

How to use Powershell to grant user rights to registry keys?

I need to grant rights to Windows user group Everyone to the HKCR hive and all the keys below th HKCR.I would like to use PowerShell scripting for this. Is it possible?

Upvotes: 0

Views: 3886

Answers (2)

Don Jones
Don Jones

Reputation: 9497

You really, really, really, don't want to do this - you're opening your system up to an enormous number of very real security risks. And, while it's entirely possible in PowerShell, using native PowerShell commands will require a pretty difficult syntax (managing ACLs using the *-ACL cmdlets is a pain). Consider reading http://support.microsoft.com/default.aspx/kb/264584; you'll be able to execute the commands in PowerShell with no problem.

Upvotes: 4

Matt Hamilton
Matt Hamilton

Reputation: 204129

You should be able to write a script that uses PowerShell's set-acl command to change hte rights on any key in the registry. HKCR is, I believe, mapped as HKLM:\Software\Classes in PowerShell.

Upvotes: 1

Related Questions