move check values to left side of comparison
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
If ( $(Get-ComputerRestorePoint) -ne $null ) { Write-Output "System Restore is already enabled" ; Exit }
|
||||
If ( $null -ne $(Get-ComputerRestorePoint) ) { Write-Output "System Restore is already enabled" ; Exit }
|
||||
Write-Output "Enabling System Restore"
|
||||
Try { Enable-ComputerRestore -Drive $Env:SystemDrive }
|
||||
Catch { Write-Error $_.Exception.Message }
|
||||
Reference in New Issue
Block a user