This Script Office
This Script Office
dev
$troubleshoot = 'https://massgrave.dev/troubleshoot'
if ($ExecutionContext.SessionState.LanguageMode.value__ -ne 0) {
$ExecutionContext.SessionState.LanguageMode
return
function Check3rdAV {
if ($avList) {
Write-Host '3rd party Antivirus might be blocking the script - ' -ForegroundColor
White -BackgroundColor Blue -NoNewline
function CheckFile {
param ([string]$FilePath)
Check3rdAV
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$URLs = @(
'https://raw.githubusercontent.com/massgravel/Microsoft-Activation-Scripts/
313f240448953cd5fe3c5631f4e4de502f23fc9a/MAS/All-In-One-Version-KL/
MAS_AIO.cmd',
'https://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/
repositories/Microsoft-Activation-Scripts/items?path=/MAS/All-In-One-Version-KL/
MAS_AIO.cmd&versionType=Commit&version=313f240448953cd5fe3c5631f4e4de50
2f23fc9a',
'https://git.activated.win/massgrave/Microsoft-Activation-Scripts/raw/commit/
313f240448953cd5fe3c5631f4e4de502f23fc9a/MAS/All-In-One-Version-KL/
MAS_AIO.cmd'
if (-not $response) {
Check3rdAV
Write-Host "Failed to retrieve MAS from any of the available repositories, aborting!"
return
$writer.Write($response)
$writer.Flush()
$stream.Position = 0
$hash =
[BitConverter]::ToString([Security.Cryptography.SHA256]::Create().ComputeHash($str
eam)) -replace '-'
$response = $null
return
# Check for AutoRun registry which may create issues with CMD
$rand = [Guid]::NewGuid().Guid
CheckFile $FilePath
$env:ComSpec = "$env:SystemRoot\system32\cmd.exe"
CheckFile $FilePath