New-Item fails on "Policies" hive with access denied

Ian Xue (Shanghai Wicresoft Co., Ltd.) 28,721 Reputation points Microsoft Vendor
2020-07-16T03:08:35.977+00:00

It seems I can't write under policies, but directy I can. I need to alter something in registery under Policies. Is this doable?

New-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\System" -Force     
New-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\System" -Name DisableAcrylicBackgroundOnLogon -Value "1" -PropertyType DWord -Force 

= access denied

New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\System" -Force     
New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\System" -Name DisableAcrylicBackgroundOnLogon -Value "1" -PropertyType Dword -Force 

= success

https://social.technet.microsoft.com/Forums/windowsserver/en-US/7e2507bd-c472-4147-8714-d6a71b45c4af/newitem-fails-on-quotpoliciesquot-hive-with-access-denied?forum=winserverpowershell#73bd193b-95f4-4faf-a642-71d51743456a

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,306 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful