title: How can I check for a pending reboot?
body: <p>I am trying to get to know where reboot is required or not for a Windows machine. However, my script is throwing and error.</p>
  
  <pre><code>powershell "$key = Get-Item "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" -ErrorAction SilentlyContinue"
  
  Error :
  Get-Item : A positional parameter cannot be found that accepts argument
  'Update\RebootRequired'.
  At line:1 char:8
  + $key = Get-Item
  HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Aut ...
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ~~~
      + CategoryInfo          : InvalidArgument: (:) [Get-Item], ParameterBindin
     gException
      + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell
     .Commands.GetItemCommand
  </code></pre>
  
  <p>I am running this command in "command prompt". Not sure what it means ! </p>