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:
Install-WindowsFeature -Name WindowsPowerShellWebAccess ` -ComputerName <String> ` -IncludeManagementTools ` -Restart
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>` -UseTestCertificate
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:
- Create an application pool for the PSWA web application.
- Associate the application pool with a website.
- Sets the path of the files for the website
- Configure the website to use an HTTPS binding.
- 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://
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
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.