UseBasicParsing and fix log path

This commit is contained in:
Corbin 2024-06-04 13:51:12 -04:00
parent c461d04165
commit 3e1805ad33

View File

@ -13,6 +13,7 @@ If (!(Test-Path -PathType Container $PackagePath)) {
}
Write-Host "Downloading Agent Installer..."
Invoke-WebRequest -Uri $AgentInstallUrl -OutFile $AgentInstallerPath
Invoke-WebRequest -Uri $AgentInstallUrl -OutFile $AgentInstallerPath -UseBasicParsing
Write-Host "Starting installation..."
msiexec.exe /i "$AgentInstallPath" /q /lv "$(Join-Path -Path $PackagePath -ChildPath $AgentInstallerName).log" SERVERADDRESS="$ServerAddress" SERVERPASS="$ServerPass" LOCATION="$LocationId"
msiexec.exe /i "$AgentInstallPath" /q /lv "$(Join-Path -Path $PackagePath -ChildPath $AgentInstallFile).log" SERVERADDRESS="$ServerAddress" SERVERPASS="$ServerPass" LOCATION="$LocationId"
Write-Host "Log saved at $(Join-Path -Path $PackagePath -ChildPath $AgentInstallFile).log"