Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Remove-Item Requested registry access is not allowed

$
0
0

Help please,

I have written a Powershell script that is trying to use Remove-Item to delete some Registry keys. I am running under Admin. if I go into Regedit it will let me delete the keys but if I run the Powershell script I get "Remove-Item Requested registry access is not allowed."

I have checked the permissions for the key and it says I have Delete permission. I am using the PowerShell ISE and am on Windows 7. I have tried -Force and -Recurse but makes no difference, neither does reducing UAC to minimum. It also makes no difference if I start PowerShell ISE with Administrator privileges. Why can I delete from within Regedit but not from PowerShell?

Be grateful for some help.

Dave


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>