Forum Discussion
StuartK73
Oct 01, 2025Iron Contributor
Remed Script to delete Reg Value
Hi All
I hope you are well.
Anyway, pulling hair out this one, so could someone help me compile a Detect and Remed script to delete the following Reg key please:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate
Value I need removed is the SetActiveHours one as below
Any help would be greatly appreciated.
3 Replies
- Bogdan_GuineaIron Contributor
Hy Stuart,
is this maybe something for you 😜 Please test it before and give me a feedback.
Good luck!
- matt91070Brass Contributor
$regPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" $valueName = "SetActiveHours" Remove-ItemProperty -Path $regPath -Name $valueName -Force -ErrorAction Stop
If I understand correctly, if you want to remove this value, I will say something simple like this in PowerShell
Hoping this might be helpful
- AND-18778683271Copper Contributor
its true and good to use