summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWindowsAddict2024-11-18 16:32:32 +0000
committerWindowsAddict2024-11-18 16:32:32 +0000
commiteb37696ac48ea8f85ff4c2512e1c61e1b42dbaf7 (patch)
tree55b84370345a57852b9fcab721b75f41524aff38
parent9e8c4da6976c04170425fecf146acbb94eb6872f (diff)
downloadmassgravel.github.io-eb37696ac48ea8f85ff4c2512e1c61e1b42dbaf7.zip
Add colors in troubleshoot info
-rw-r--r--get11
1 files changed, 7 insertions, 4 deletions
diff --git a/get b/get
index 510bea7..7da6e81 100644
--- a/get
+++ b/get
@@ -3,15 +3,17 @@
function CheckFile {
if (-not (Test-Path -Path $FilePath)) {
Check3rdAV
- Write-Warning "Failed to create MAS file in temp folder, aborting!`n`nHelp - https://massgrave.dev/troubleshoot"
- throw
+ Write-Host "Failed to create MAS file in temp folder, aborting!"
+ Write-Host "Help - https://massgrave.dev/troubleshoot" -ForegroundColor White -BackgroundColor Blue
+ try { throw } catch {}
}
}
function Check3rdAV {
$avList = Get-CimInstance -Namespace root\SecurityCenter2 -Class AntiVirusProduct | Where-Object { $_.displayName -notlike '*windows*' } | Select-Object -ExpandProperty displayName
if ($avList) {
- Write-Warning "Installed 3rd party Antivirus might be blocking the script: $($avList -join ', ')"
+ Write-Host '3rd party Antivirus might be blocking the script - ' -ForegroundColor White -BackgroundColor Blue -NoNewline
+ Write-Host " $($avList -join ', ')" -ForegroundColor DarkRed -BackgroundColor White
}
}
@@ -28,7 +30,8 @@ foreach ($URL in $URLs | Sort-Object { Get-Random }) {
if (-not $response) {
Check3rdAV
- Write-Warning "Failed to retrieve MAS from any of the available repositories, aborting!`n`nHelp - https://massgrave.dev/troubleshoot"
+ Write-Host "Failed to retrieve MAS from any of the available repositories, aborting!"
+ Write-Host "Help - https://massgrave.dev/troubleshoot" -ForegroundColor White -BackgroundColor Blue
return
}