1
votes

How can I write script to asking registry if RebootRequired exits in next path? HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired and if RebootRequired exists output> true and if RebootRequired not exists output> false

I tried several attempts without success

thanks

1

1 Answers

0
votes
Invoke-Command -ScriptBlock {Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired"}