diff options
| author | WindowsAddict | 2024-08-15 00:39:59 +0000 |
|---|---|---|
| committer | WindowsAddict | 2024-08-15 00:39:59 +0000 |
| commit | 6b6d52cc2953e363c4bdf195325af12c93b40f53 (patch) | |
| tree | b0411367f88c9c16f2818ba434cc30b963d806e9 /static/get.ps1 | |
| parent | 0441728f128758189b3f69c9a7110d00f1f443a0 (diff) | |
| download | massgrave.dev-6b6d52cc2953e363c4bdf195325af12c93b40f53.zip | |
Fix $RandomURL2 and formatting
Diffstat (limited to 'static/get.ps1')
| -rw-r--r-- | static/get.ps1 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/static/get.ps1 b/static/get.ps1 index 64b31f2..0d3b604 100644 --- a/static/get.ps1 +++ b/static/get.ps1 @@ -8,20 +8,20 @@ Write-Host -ForegroundColor Green "Use the new command (irm https://get.activate write-host
# 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
}
catch {
- $response = Invoke-WebRequest -Uri $RandomURL2 -UseBasicParsing
+ $response = Invoke-WebRequest -Uri $RandomURL2 -UseBasicParsing
}
$rand = [Guid]::NewGuid().Guid
|
