Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 34890

Stop PowerShell.exe from Starting!

$
0
0

What!?

Have you gone mad?“, I hear you cry!

Last month (and year), I posted about limiting the functionality of PowerShell – Security Focus: Set ConstrainedLanguage Mode on My Machine.

This month (and this year), I’ve found an oddity with this particular technique…

 

Warning: Don’t Try This At Home!

Whilst playing around with the __PSLockdownPolicy setting, I discovered that using a negative value causes the default PowerShell hosts to crash.


[Environment]::SetEnvironmentVariable('__PSLockdownPolicy', '-1', 'Machine')

 

Let’s try and start PS…

 

capture195

 

Duly reported to the PowerShell powers that be.

 


Viewing all articles
Browse latest Browse all 34890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>