Skip to main content
Jorge Bernhardt Jorge Bernhardt
  1. Posts/

How to install the Windows PowerShell Web Access Gateway

·347 words·2 mins· 100 views · 5 likes ·
Add-PswaAuthorizationRule Get-WindowsFeature Install-PswaWebApplication Install-WindowsFeature

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>

Install the Windows PowerShell Web Access feature #

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

    -Name WindowsPowerShellWebAccess `
    -ComputerName <String> `
    -IncludeManagementTools `
PowerShell Web Access Gateway

PowerShell Web Access Gateway

This action installs the following Windows roles and features.


Configure the gateway application>

Configure the gateway application #

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

Install-PswaWebApplication `
    -webApplicationName <String>`

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:///

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>

Configure an authorization rule #

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

Add-PswaAuthorizationRule `
    -UserName <String[]> `
    -ComputerName <String> `
    -ConfigurationName Microsoft.PowerShell

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

Thanks for reading my post. I hope you find it useful.

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