Skip to content

Commit

Permalink
add language mode warning
Browse files Browse the repository at this point in the history
  • Loading branch information
MyDrift-user committed Jul 18, 2024
1 parent e82870d commit 46095f1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/start.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ $sync.version = "#{replaceme}"
$sync.configs = @{}
$sync.ProcessRunning = $false

if ($ExecutionContext.SessionState.LanguageMode -ne 'FullLanguage')
{
Write-Host "Current language mode is $($ExecutionContext.SessionState.LanguageMode)"
Write-Host "Many PowerShell commands are disabled in this mode. Please run:"
Write-Host " `$ExecutionContext.SessionState.LanguageMode = `"FullLanguage`""
break
}

# If script isn't running as admin, show error message and quit
If (([Security.Principal.WindowsIdentity]::GetCurrent()).Owner.Value -ne "S-1-5-32-544")
{
Expand Down

0 comments on commit 46095f1

Please sign in to comment.