Install PowerShell From Command Line

To install PowerShell on Windows Server 2008 R2 or Hyper-V Server 2008 R2, following features needs to be installed.

  1. NetFx2-ServerCore
  2. NetFx3-ServerCore
  3. MicrosoftWindowsPowerShell

Because Powershell is built on DotNet framework, DotNet 2.0 and 3.5  has to be installed prior to PowerShell installation.

To install PowerShell from command line, run following from elevated command prompt

DISM.exe /online /enable-feature /featurename:NetFx2-ServerCore DISM.exe /online /enable-feature /featurename:NetFx3-ServerCore DISM.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShell

Or run following command if it’s an 64bit machine

DISM.exe /online /enable-feature /featurename:NetFx2-ServerCore-WOW64 
DISM.exe /online /enable-feature /featurename:NetFx3-ServerCore-WOW64 
DISM.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShell-WOW64 


41 responses to “Install PowerShell From Command Line”

Leave a Reply