Last Update: Sep 04, 2024 | Published: Apr 23, 2014
Windows PowerShell Web Access allows users to access PowerShell on a remote server via a web browser, without any prerequisite requirements on the client device, apart from a supported web browser. In this Ask the Admin, I’ll show you how to quickly install and configure this feature in Windows Server 2012. For more detailed configuration options on how to install PowerShell Web Access, see the four-part series PowerShell Web Access by Jeff Hicks.
A Windows PowerShell Web Access Gateway allows users to remotely access servers on a remote network using PowerShell commands executed from a web browser. To install the gateway, log in to Windows Server 2012 R2 as an administrator:
Once operation has completed, we can use PowerShell to configure the web application in IIS. The resulting URL for the web access console will be https://<server_name>/pswa, where <server_name> is the DNS name of the server where you are installing the Web Access Gateway.
The –UseTestCertificate parameter should only be used when creating a Web Access Gateway in a test lab. In a production environment, you can use the same command, but you should replace the certificate with one signed by a certification authority. The test certificate generated expires after 90 days.
Before users can authorize, you need to setup authorization rules. This can only be done using PowerShell. In this example, I’m going to manage access in the authorization rule by using an Active Directory group. It is also possible to specify individual or multiple user accounts instead. For more information of the command syntax, see Add-PswaAuthorizationRule on TechNet.
To see a list of existing authorization rules, type Get-PswaAuthorizationRule in the PowerShell console window.
Now we are ready to access a remote computer via the gateway, as defined in the authorization rule created in the previous step.
Note that in a workgroup environment, the username should be entered in this format: <workgroup><username>.