Professional Documents
Culture Documents
$ErrorActionPreference = "Stop"
# Enable TLSv1.2 for compatibility with older clients
[Net.ServicePointManager]::SecurityProtocol =
[Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
$DownloadURL = 'https://raw.githubusercontent.com/massgravel/Microsoft-Activation-
Scripts/master/MAS/All-In-One-Version/MAS_AIO.cmd'
$DownloadURL2 = 'https://bitbucket.org/WindowsAddict/microsoft-activation-scripts/
raw/master/MAS/All-In-One-Version/MAS_AIO.cmd'
try {
$response = Invoke-WebRequest -Uri $DownloadURL -UseBasicParsing
}
catch {
$response = Invoke-WebRequest -Uri $DownloadURL2 -UseBasicParsing
}