title: Trying to run a chkdsk on c:\ automatically
body: <p>Trying to run a chkdsk on all drives of the computer. Having issues with having C:\ start at all. </p>
  
  <p>Trying to use SendKeys to answer "Would you like to schedule this volume to be checked the next time the system restarts? (Y/N)" but having no luck. Where am I going wrong?</p>
  
  <pre><code>$host.ui.RawUI.WindowTitle = "BOHCdrivefix"
  
  $FixCDrive = Start-Job -Name cDriveFix -ScriptBlock {chkdsk c:/f} 
  $wshell = New-Object -ComObject wscript.shell;
  $wshell.AppActivate('BOHCdrivefix')
  sleep 3
  $wshell.SendKeys('y') 
  $wshell.SendKeys('~')
  wait-job $FixCDrive
  Receive-Job $FixCDrive | Out-File -FilePath D:\temp\cDriveFix.txt
  shutdown -r -f -t 0
  </code></pre>
  
  <p>I would like to answer Y to the question then shutdown the PC and have it start the chkdsk</p>