mirror of
https://github.com/massgravel/get.activated.win.git
synced 2024-11-09 21:38:43 +01:00
Merge pull request #3 from ave9858/fallback
fix fallback URL and format script
This commit is contained in:
commit
5459c9f129
1 changed files with 2 additions and 2 deletions
4
get
4
get
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
# Enable TLSv1.2 for compatibility with older clients for current session
|
# Enable TLSv1.2 for compatibility with older clients for current session
|
||||||
[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||||
|
|
||||||
$DownloadURL1 = 'https://raw.githubusercontent.com/massgravel/Microsoft-Activation-Scripts/35e044ddc85eed60b27b37c48371bd19cdc678b7/MAS/All-In-One-Version/MAS_AIO-CRC32_8C3AA7E0.cmd'
|
$DownloadURL1 = 'https://raw.githubusercontent.com/massgravel/Microsoft-Activation-Scripts/35e044ddc85eed60b27b37c48371bd19cdc678b7/MAS/All-In-One-Version/MAS_AIO-CRC32_8C3AA7E0.cmd'
|
||||||
$DownloadURL2 = 'https://bitbucket.org/WindowsAddict/microsoft-activation-scripts/raw/35e044ddc85eed60b27b37c48371bd19cdc678b7/MAS/All-In-One-Version/MAS_AIO-CRC32_8C3AA7E0.cmd'
|
$DownloadURL2 = 'https://bitbucket.org/WindowsAddict/microsoft-activation-scripts/raw/35e044ddc85eed60b27b37c48371bd19cdc678b7/MAS/All-In-One-Version/MAS_AIO-CRC32_8C3AA7E0.cmd'
|
||||||
|
@ -12,7 +12,7 @@ $RandomURL1 = Get-Random -InputObject $URLs
|
||||||
$RandomURL2 = ($URLs -ne $RandomURL1)[0]
|
$RandomURL2 = ($URLs -ne $RandomURL1)[0]
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$response = Invoke-WebRequest -Uri $RandomURL1 -UseBasicParsing
|
$response = Invoke-WebRequest -Uri $RandomURL1 -UseBasicParsing
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
$response = Invoke-WebRequest -Uri $RandomURL2 -UseBasicParsing
|
$response = Invoke-WebRequest -Uri $RandomURL2 -UseBasicParsing
|
||||||
|
|
Loading…
Reference in a new issue