Quantcast
Channel: Deployment Research - Johan Arwidmark
Viewing all articles
Browse latest Browse all 168

Enabling PowerShell Hardcore Mode

$
0
0

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


More ...

Viewing all articles
Browse latest Browse all 168