Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions thor-seed/thor-seed.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,29 @@ param
$ProxyCredentials = [System.Management.Automation.PSCredential]::Empty
)

# THOR Seed requires FullLanguage mode because it uses .NET APIs for TLS,
# download handling, ZIP extraction, and process setup.
$LanguageMode = $ExecutionContext.SessionState.LanguageMode.ToString()
if ($LanguageMode -ne "FullLanguage")
{
Write-Host ""
Write-Host "===========================================================" -ForegroundColor Red
Write-Host " ERROR: Unsupported PowerShell Language Mode detected" -ForegroundColor Red
Write-Host "===========================================================" -ForegroundColor Red
Write-Host ""
Write-Host "Current Language Mode : $LanguageMode"
Write-Host ""
Write-Host "THOR Seed requires FullLanguage mode and cannot continue."
Write-Host "This is commonly caused by App Control for Business / WDAC,"
Write-Host "AppLocker, JEA, or endpoint security policy restrictions."
Write-Host ""
Write-Host "Allow or sign thor-seed.ps1 according to your policy and rerun it."
Write-Host "Reference: https://learn.microsoft.com/en-us/windows/security/application-security/application-control/app-control-for-business/design/script-enforcement"
Write-Host ""

exit 7
}

# #####################################################################
# Presets -------------------------------------------------------------
# #####################################################################
Expand Down