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
@@ -3,13 +3,13 @@ $MSIURL = 'https://enscape-installer.chaosgroup.com/installer.enscape.io/Enscape
## Run the installer
$INSTALLER = Download-File -URL $MSIURL
LogMsg "Installing Enscape from ""${INSTALLER}"""
Write-Output "Installing Enscape from ""${INSTALLER}"""
Try { Start-Process "msiexec.exe" -ArgumentList "/i ${INSTALLER} /qn /norestart ACCEPTEULA=1 ALLUSERS=1" -Wait -ErrorAction Stop }
Catch { LogErr $_.Exception.Message }
## Delete installer
Try {
LogMsg "Deleting downloaded installation package"
Write-Output "Deleting downloaded installation package"
Remove-Item $INSTALLER -Force -ErrorAction SilentlyContinue
}
Catch { LogErr $_.Exception.Message }