major change to override Write-Error func
This commit is contained in:
@@ -3,6 +3,6 @@ $REG_PROP = 'AlwaysUseMSOAuthForAutoDiscover'
|
||||
If ( !((Get-ItemProperty -Path $REG_PATH -Name $REG_PROP -ErrorAction SilentlyContinue).$REG_PROP) ) {
|
||||
Write-Output "Adding registry entry: ""${REG_PATH}\${REG_PROP}"" = 1"
|
||||
Try { New-ItemProperty -Path $REG_PATH -Name $REG_PROP -PropertyType DWord -Value 1 | Out-Null }
|
||||
Catch { LogErr $_.Exception.Message }
|
||||
Catch { Write-Error $_.Exception.Message }
|
||||
}
|
||||
Else { Write-Output "The registry path already exists: ""${REG_PATH}\${REG_PROP}""" }
|
||||
|
||||
Reference in New Issue
Block a user