You are here:   Research
  |  Login

Welcome to my blog, quickest way to find articles is usually to search for them.

Minimize
Search in All Title Contents
 
     

Enabling PowerShell Hardcore Mode

Feb 11 2015

Haha, run into a tweet from “nohandle” earlier today that made me laugh out loud. Enabling PowerShell HardCore Mode :)

 

Enabling PowerShell HardCore Mode

Hardcode Mode basically means that you configure PowerShell to shutdown the computer if you type in a command that does not exist.

Note: do NOT do this on any production machine, or at least don’t yell at me if the machine turns off :)

$ExecutionContext.InvokeCommand.CommandNotFoundAction = { Stop-Computer -Force }

image

As long as you don’t mistype any command, all is well, but if not… .this happen

image








Happy deployment, and thanks for reading!
/ The Deployment Research team



Ami Casto

Johan Arwidmark

Blog Archive

Minimize