move check values to left side of comparison

This commit is contained in:
2023-10-05 13:33:28 -04:00
parent ab2a1821d5
commit 983952ee99
3 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -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 }