Powershell – Server 2012 Server Core powershell not installed

powershellwindows-server-2012

In server core, after a restart powershell was all of a sudden not installed, what do I do to reinstall it?

I do not have remote administration set up yet so I cannot use that to re-install it.

'powershell' is not recognized as an internal or external command, operable program, or batch file.

Best Answer

Use the Deployment Image Servicing and Management (DISM.exe) tool to enable PowerShell:

dism.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShellRoot

...or if that's not enough:

dism.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShell /all