Update install-microsoft-ata.ps1
Add additional write-host statements
This commit is contained in:
@@ -113,6 +113,7 @@ Invoke-Command -computername dc -Credential (new-object pscredential("windomain\
|
|||||||
|
|
||||||
If (-not (Test-Path "$env:temp\gatewaysetup.zip"))
|
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")))
|
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
|
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"))
|
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"
|
Set-Location "$env:temp\gatewaysetup"
|
||||||
Start-Process -Wait -FilePath ".\Microsoft ATA Gateway Setup.exe" -ArgumentList "/q NetFrameworkCommandLineArguments=`"/q`" ConsoleAccountName=`"wef\vagrant`" ConsoleAccountPassword=`"vagrant`""
|
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
|
else
|
||||||
{
|
{
|
||||||
Write-Host "[$env:computername] ATA Gateway already installed. Moving On."
|
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')
|
(Get-Service ATAGateway).WaitForStatus('Running', '00:10:00')
|
||||||
If ((Get-Service "ATAGateway").Status -ne "Running")
|
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
|
# Disable invalid web requests to endpoints with invalid SSL certs again
|
||||||
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = $null
|
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = $null
|
||||||
|
|||||||
Reference in New Issue
Block a user