In this post, I want to show you how to install the Windows PowerShell Web Access gateway on a server that is running Windows Server 2016 by using Windows PowerShell cmdlets.

PowerShell Web Access Gateway allows remote administration of our server from outside. We can perform administration tasks on remote servers from devices that have access to an Internet connection and a web browser.

Install the Windows PowerShell Web Access feature

To install the PowerShell Web Access Gateway, use the Install-WindowsFeature cmdlet with the following syntax:

PowerShell Web Access Gateway

This action installs the following Windows roles and features.


Configure the gateway application

To configure a test installation of the gateway application, we can use the Install-PswaWebApplication cmdlet with the following syntax:

Important: The –UseTestCertificate parameter should only be used in a test environment. For a production environment, you should use a valid certificate that has been signed by a CA.


This action performs the following tasks in IIS:

  1. Create an application pool for the PSWA web application.
  2. Associate the application pool with a website.
  3. Sets the path of the files for the website
  4. Configure the website to use an https binding.
  5. Specify an SSL certificate for the website.

Once the command has been executed successfully, the PWA site is online, we can connect using the default URL: https://<ServerName>/<WebApplicationName>


But we can not log in until the Windows PowerShell Web Access administrator gives us explicit access to the servers. To do this we must add an authorization rule.

Configure an authorization rule

To add an authorization rule, we use the Add-PswaAuthorizationRule cmdlet with the following syntax:


We can verify the creation of the rule using the cmdlet Test-PswaAuthorizationRule.


If you want to know more about PowerShell Web Access Gateway, check out this link: