Can someone help me with this powershell script? I can't get it to work.
$drives = Get-WmiObject -class win32_logicaldisk |
Where-Object { $_.DriveType -eq 3 }
$drives | ForEach-Object { Enable-ComputerRestore $_.Name }
Moreover the following works like expected!
$drives = Get-WmiObject -class win32_logicaldisk |
Where-Object { $_.DriveType -eq 3 }
$drives | ForEach-Object { Write-Host $_.Name }
Thanks in advance.