Powershell needs simpler TakeOwnership method for Registry - by Graham Gold

Status : 


Sign in
to vote
ID 794610 Comments
Status Active Workarounds
Type Suggestion Repros 0
Opened 7/19/2013 4:40:49 PM
Access Restriction Public


Currently attempting to create/modify/amend a protected registry key requires convoluted workarounds or long winded scripts just to take ownership if a key that the current security principal in the runspace already has sufficient access to take ownership.

See for example the following script via Technet : http://social.technet.microsoft.com/Forums/windowsserver/en-US/e718a560-2908-4b91-ad42-d392e7f8f1ad/take-ownership-of-a-registry-key-and-change-permissions

Should really be possible either as an extension to existing cmdlets (-TakeOwnership switch anyone?) or maybe a new cmdlet, say Set-ItemOwner or such?

If there was an option to take only temporary ownership to make the change and then restore the acl as was, so much the better.
Sign in to post a comment.