$ErrorActionPreference = "Stop" $isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole( [Security.Principal.WindowsBuiltInRole]::Administrator ) if (-not $isAdmin) { Start-Process powershell.exe -Verb RunAs -ArgumentList @( "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", "`"$PSCommandPath`"" ) exit } $caUrl = "http://192.168.111.183:9988/setup/atlas-ca.crt" $secureAtlas = "https://192.168.111.183:9443" $tempCert = Join-Path $env:TEMP "Atlas-Local-CA.crt" Write-Host "Downloading the Atlas Local CA..." -ForegroundColor Cyan Invoke-WebRequest -UseBasicParsing -Uri $caUrl -OutFile $tempCert Write-Host "Installing Atlas Local CA into Local Computer Trusted Roots..." -ForegroundColor Cyan Import-Certificate -FilePath $tempCert -CertStoreLocation "Cert:\LocalMachine\Root" | Out-Null Write-Host "Atlas HTTPS trust installed successfully." -ForegroundColor Green Write-Host "Chrome or Edge must be fully closed and reopened once." -ForegroundColor Yellow Start-Process $secureAtlas Read-Host "Press Enter to close"