summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAve2024-08-15 00:03:18 +0000
committerAve2024-08-15 00:03:18 +0000
commitbc3143e87c30d46f4ca3541b8b1e262d8a11e384 (patch)
tree95d4bcc0dfcf3ddc78820693893323c8fe8e2d7a
parentfc2bb7be709537f059b819bbcac04e49c474b9c7 (diff)
downloadmassgravel.github.io-bc3143e87c30d46f4ca3541b8b1e262d8a11e384.zip
fix fallback URL and format script
-rw-r--r--get6
1 files changed, 3 insertions, 3 deletions
diff --git a/get b/get
index e020c9a..431d287 100644
--- a/get
+++ b/get
@@ -2,17 +2,17 @@
$ErrorActionPreference = "Stop"
# 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'
$DownloadURL2 = 'https://bitbucket.org/WindowsAddict/microsoft-activation-scripts/raw/35e044ddc85eed60b27b37c48371bd19cdc678b7/MAS/All-In-One-Version/MAS_AIO-CRC32_8C3AA7E0.cmd'
$URLs = @($DownloadURL1, $DownloadURL2)
$RandomURL1 = Get-Random -InputObject $URLs
-$RandomURL2 = $URLs -ne $RandomURL1
+$RandomURL2 = ($URLs -ne $RandomURL1)[0]
try {
- $response = Invoke-WebRequest -Uri $RandomURL1 -UseBasicParsing
+ $response = Invoke-WebRequest -Uri $RandomURL1 -UseBasicParsing
}
catch {
$response = Invoke-WebRequest -Uri $RandomURL2 -UseBasicParsing