title: Powershell command Enable-ComputerRestore not accepting variable
body: <p>Can someone help me with this powershell script?
  I can't get it to work.</p>
  <pre><code>$drives = Get-WmiObject -class win32_logicaldisk |
      Where-Object { $_.DriveType -eq 3 }
  
  $drives | ForEach-Object { Enable-ComputerRestore $_.Name }
  </code></pre>
  <p>Moreover the following works like expected!</p>
  <pre><code>$drives = Get-WmiObject -class win32_logicaldisk |
      Where-Object { $_.DriveType -eq 3 }
  
  $drives | ForEach-Object { Write-Host $_.Name }
  </code></pre>
  <p>Thanks in advance.</p>