major change to override Write-Error func

This commit is contained in:
2023-10-05 13:17:18 -04:00
parent bbb4884818
commit 5f4b4565de
42 changed files with 114 additions and 114 deletions
+2 -2
View File
@@ -23,9 +23,9 @@ Download-File -URL $URL -File "${AGENT_INSTALLER}"
# Install the agent
Write-Output "Installing Syncro agent from ""${AGENT_INSTALLER}"""
Try { Start-Process "msiexec.exe" -ArgumentList "/i ""${AGENT_INSTALLER}"" /qn /norestart" -Wait }
Catch { LogErr $_.Exception.Message }
Catch { Write-Error $_.Exception.Message }
# Delete the agent installer
Write-Output "Deleting ""${AGENT_INSTALLER}"""
Try { Remove-Item $AGENT_INSTALLER -Force }
Catch { LogErr $_.Exception.Message }
Catch { Write-Error $_.Exception.Message }