Problem:
As we all know, Microsoft has announced support to run SQL Server on Windows Server 2008 R2 Server Core Edition which is a GUI-less OS. However, PowerShell is a basic prerequisite to install SQL Server on Windows Server 2008 R2 Server Core Edition. In this article, we will explain the step-by-step process to install and enable PowerShell on a Windows 2008 R2 Server Core.
Solution:
Based on the current build of Microsoft SQL Server 2012, it does not install or enable Windows PowerShell. However, Windows PowerShell 2.0 is an installation prerequisite. If SQL Server setup reports that Windows PowerShell 2.0 is not present, you can install or enable it by following the instructions below on Windows Server 2008 R2 Server Core Edition.
Steps to enable PowerShell:
- Type “powershell” at the command prompt to check if PowerShell is enabled or not. If PowerShell is enabled, it will route you to the PS root directory. If PowerShell is not installed/enabled, then Windows will not recognize this command.
- Run the “sconfig.cmd” command on your command prompt and press enter. This will open the Server Configuration Tool, which allows you to configure and manage several common aspects of the Windows Server 2008 R2 Server Core installation. Choose option 4 (Configure Remote Management) to enable PowerShell.
- Once you have selected option 4, you will see all of the options under the “Configure Remote Management” interface. Choose option 2 to “Enable Windows PowerShell”.
- The PowerShell configuration process will start and the configuration progress will be displayed.
- Once PowerShell has been successfully enabled, a separate command prompt screen will appear and close after the process reaches 100% completion. This is the deployment of features using the Dism.exe (Deployment Image Servicing and Management) tool.
- After all of the processes have completed, a restart window will appear and ask you to restart the machine in order for all of the changes to be committed. Click the “Yes” button to restart the machine.
- Once the machine has been rebooted, type “powershell” on the command prompt. This time it will take a few seconds to load and then route you to a PS command prompt. You can run the “Get-Host” cmdlet to check the PowerShell version.
Conclusion:
Enabling PowerShell on Windows Server 2008 R2 Server Core is a necessary step to install SQL Server. By following the steps outlined in this article, you can successfully enable PowerShell and proceed with the installation of SQL Server on Windows Server 2008 R2 Server Core Edition.