major update to override Write-Output func

This commit is contained in:
2023-10-05 13:11:38 -04:00
parent 31a06a9206
commit bbb4884818
52 changed files with 377 additions and 378 deletions
+2 -2
View File
@@ -21,11 +21,11 @@ $AGENT_INSTALLER = '{0}{1}' -f (Get-TempPath), $AGENT_FILENAME
Download-File -URL $URL -File "${AGENT_INSTALLER}"
# Install the agent
LogMsg "Installing Syncro agent from ""${AGENT_INSTALLER}"""
Write-Output "Installing Syncro agent from ""${AGENT_INSTALLER}"""
Try { Start-Process "msiexec.exe" -ArgumentList "/i ""${AGENT_INSTALLER}"" /qn /norestart" -Wait }
Catch { LogErr $_.Exception.Message }
# Delete the agent installer
LogMsg "Deleting ""${AGENT_INSTALLER}"""
Write-Output "Deleting ""${AGENT_INSTALLER}"""
Try { Remove-Item $AGENT_INSTALLER -Force }
Catch { LogErr $_.Exception.Message }