From 2708f4fa4e2b68fd89683f59af72c372777e3c93 Mon Sep 17 00:00:00 2001 From: Chris Long Date: Mon, 15 Jun 2020 00:53:35 -0700 Subject: [PATCH] Update install-microsoft-ata.ps1 Add additional write-host statements --- Vagrant/scripts/install-microsoft-ata.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Vagrant/scripts/install-microsoft-ata.ps1 b/Vagrant/scripts/install-microsoft-ata.ps1 index 1cccee2..d9dc2a9 100644 --- a/Vagrant/scripts/install-microsoft-ata.ps1 +++ b/Vagrant/scripts/install-microsoft-ata.ps1 @@ -113,6 +113,7 @@ Invoke-Command -computername dc -Credential (new-object pscredential("windomain\ If (-not (Test-Path "$env:temp\gatewaysetup.zip")) { + Write-Host "[$env:computername] ATA Gateway not yet downloaded. Downloading now..." Invoke-WebRequest -uri https://wef/api/management/softwareUpdates/gateways/deploymentPackage -UseBasicParsing -OutFile "$env:temp\gatewaysetup.zip" -Credential (new-object pscredential("wef\vagrant",(convertto-securestring -AsPlainText -Force -String "vagrant"))) Expand-Archive -Path "$env:temp\gatewaysetup.zip" -DestinationPath "$env:temp\gatewaysetup" -Force } @@ -122,17 +123,20 @@ Invoke-Command -computername dc -Credential (new-object pscredential("windomain\ } if (-not (Test-Path "C:\Program Files\Microsoft Advanced Threat Analytics")) { + Write-Host "[$env:computername] ATA Gateway not yet installed. Attempting to install now..." Set-Location "$env:temp\gatewaysetup" Start-Process -Wait -FilePath ".\Microsoft ATA Gateway Setup.exe" -ArgumentList "/q NetFrameworkCommandLineArguments=`"/q`" ConsoleAccountName=`"wef\vagrant`" ConsoleAccountPassword=`"vagrant`"" + Write-Host "[$env:computername] ATA Gateway installation complete!" } else { Write-Host "[$env:computername] ATA Gateway already installed. Moving On." } + Write-Host "[$env:computername] Waiting for the ATA Gateway service to start..." (Get-Service ATAGateway).WaitForStatus('Running', '00:10:00') If ((Get-Service "ATAGateway").Status -ne "Running") { - throw "ATA lightweight gateway not running" + throw "ATA Gateway service failed to start on DC" } # Disable invalid web requests to endpoints with invalid SSL certs again [System.Net.ServicePointManager]::ServerCertificateValidationCallback = $null