PowerShell Web Access: Installation Guide

Since v2, Windows PowerShell has offered a great remote management story. With PowerShell v3 and the arrival of Windows Server 2012 it gets even better: How would you like to be able to remotely manage a server using PowerShell from your iPad or Android tablet? Or from your phone? Now you can with a new Windows Server 2012 feature that allows you establish secure, remote PowerShell sessions via a web browser.

In the first part of this series, I’ll go over installing PowerShell Web Access (PSWA). Installation doesn’t mean your entire network is wide open. PowerShell Web Access provides a web-based gateway to designated servers that you want to remotely manage via PowerShell. The gateway will create a secure connection to a remoting endpoint that you designate. (I’ll cover configuration in a separate article.) But the point is that you could define a constrained endpoint and delegate remote administration via a web browser to the users or groups that you determine. I think you’ll find this easiest to set up in a domain environment.
In part two of this series, I discuss PowerShell Web Access configuration, and in part three I’ll show you how to test the PSWA web application. In this final article we’ll reconfigure PowerShell Web Access for use in the domain.

Requirements for PowerShell Web Access (PSWA)

PowerShell Web Access (PSWA) runs as an IIS application on Windows Server 2012. You will need the following role services or features:

  • IIS Management Console
  • ASP .NET 4.5
  • ISAP Extensions
  • ISAP Filters
  • .NET Extensibility 4.5
  • Default document
  • HTTP Errors
  • HTTP Redirection
  • Static Content
  • Request Filtering

But don’t feel you have to install them first. When you install the PSWA feature, Windows will prompt you to install any required and missing parts. You’ll eventually need a web certificate for the gateway. I’ll cover that later.
From the client side, you of course need a web browser:

  • Internet Explorer 8 or later
  • Mozilla Firefox
  • Google Chrome for Windows
  • Apple Safari for Windows
  • Apple Safari for Mac OS

For non-Microsoft browsers, the latest version is always best. The client browser will also need to run Javascript and be able to accept cookies from the gateway server

How to Install PowerShell Web Access

You can install PSWA via Server Manager or PowerShell. In Server Manager, either locally or via a Windows 8 desktop running Remote Server Administration Tools (RSAT), first click Manage – Add Roles and Features. I’m going to install the service on CHI-WEB01 from my Windows 8 desktop. In the wizard, select role-based or feature-based installation. Select the server to configure as I have below in Figure 1.
 
Install Powershell Web access select server
This is a new server that I plan to use for other web services, so on the Select Server Roles screen, I’ll go ahead and select Web Server.
Install-PSWA web server
 
If prompted, install additional features as required. Click Next. Scroll down to Windows PowerShell and expand. Check Windows PowerShell Web Access.
 
Install powershell web access
 
Depending on your existing configuration, you may be prompted to install additional required features. When you get to the IIS feature configuration screen, everything you need for PSWA should already be checked.
Install powershell web access iis configuration
 
Complete the installation and reboot if required.
Install powershell web access

How to Install Using Powershell

To achieve the same results using PowerShell, I can run this command on my Windows 8 box.

​PS C:\> Add-WindowsFeature –name Web-Server,WindowsPowerShellWebAccess –computername chi-web01

If you aren’t installing the Web-Server like I am here, then be sure to specify installation of management tools.

​
PS C:\> Add-WindowsFeature –name Web-Server,WindowsPowerShellWebAccess –computername chi-web01 -IncludeManagementTools

After installation you can verify by running the Get-Windows feature as I did, as shown below.
 
Install powershell web access
 
Or, you can also use Server Manger to verify the feature installation.
Installation of the PowerShell Web Access feature is not difficult in the least. What might take some time is planning on how you will use the feature. What servers do you want to be managed? Who will be connecting? What will they be doing? Will they be connecting internally or externally? Many of these questions are related to configuration which I’ll cover in the next article of this series.