Tuesday 23 November 2021

How to install the Windows PowerShell Web Access Gateway

 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.

get-windowsFeature

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.

install-pswawebapplication

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>

Webapplication.PSWA

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:

add-pswaAuthorizationrule

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

test-pswaAuthorizationrule

If you want to know more about PowerShell Web Access Gateway, check out this link: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh831611(v=ws.11)

No comments:

Post a Comment