- Jul 3, 2015
- 8,153
On Windows 7 Ultimate x64, I ran the following from elevated Powershell prompt:
Then I closed the prompt, and reopened it, and ran
But it said "FullLanguage".
Then I went into Control Panel, and in advanced security settings, I looked at the environment variables, and one of them is: "PSLockdownPolicy 4".
So... is it enabled, or is it not?
Code:
[Environment]::SetEnvironmentVariable('__PSLockdownPolicy', '4', 'Machine')
Code:
$ExecutionContext.SessionState.LanguageMode
But it said "FullLanguage".
Then I went into Control Panel, and in advanced security settings, I looked at the environment variables, and one of them is: "PSLockdownPolicy 4".
So... is it enabled, or is it not?