Is PowerShell 2.0 Installed by Default on Windows Server 2008 R2?

As with most things in IT, the answer is that it depends. It depends on whether or not the server was installed with the Full Installation or with the Server Core Installation. It also depends on what your definition of installed is.

ps2-2008r2core01.png

If the server was installed with the Full Installation (GUI) then PowerShell is installed (enabled) by default, but if it was installed using the Server Core Installation (no GUI) then PowerShell is not installed (not enabled) by default.

If you attempt to run powershell.exe on a fresh installation of 2008 R2 Server Core, it has no idea what you’re talking about since that feature isn’t enabled although the binaries are sitting on the hard drive and they’re ready for you to enable that particular feature:

ps2-2008r2core1.png

You could use sconfig to enable the PowerShell feature on Server Core:

ps2-2008r2core2.png

Script execution is automatically set to “Remote Signed” as shown in the screenshot below if you enable PowerShell using this method:

ps2-2008r2core5.png

Sconfig actually uses the Deployment Image Service and Management Tool (DISM) behind the scenes to enable PowerShell. That’s what’s going on in this minimized window:

ps2-2008r2core6.png

Then you’re prompted to restart:

ps2-2008r2core7.png

You could also use the Deployment Image Service and Management Tool (DISM) directly to enable the PowerShell feature on Server Core. You’ll have to specify the .NET Framework 2.0 and PowerShell if you’re using this method. Only specifying PowerShell will cause the installation to fail since the .NET Framework 2.0 is a prerequisite:

Dism /online /enable-feature /featurename:NetFx2-ServerCore /featurename:MicrosoftWindowsPowerShell

ps2-2008r2core3.png

It is technically possible to run PowerShell at this point without restarting the server, but your path environment variable hasn’t been refreshed so a restart is recommended otherwise you’ll have to specify the full path to the executable or manually change into the PowerShell directory to be able to run it:

ps2-2008r2core4.png

If you go the DISM route, you’ll need to manually change the script execution policy (if you want to be able to run scripts):

ps2-2008r2core8.png

IT Pro’s should start familiarizing themselves with the Server Core Installation (no GUI) since it’s the default on Windows Server 8 (aka Windows Server 2012). If you run through the installation of it without changing any of the defaults, you’ll end up with server core:

ps2-2008r2core0.png

Regardless of which installation option you chose on Windows Server 8 (Core or GUI), PowerShell is installed by default.

ยต