Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon

How to use PowerShell Web Access to manage Windows Server

Save for later
  • 3 min read
  • 28 Oct 2013

article-image

(For more resources related to this topic, see here.)

All that is required to run the web-based Windows PowerShell console is a properly configured Windows PowerShell Web Access gateway, and a client device browser that supports JavaScript and accepts cookies.

Examples of client devices include laptops, tablet computers, web kiosks, computers that are not running a Windows-based operating system, and cell phone browsers. IT pros can perform critical management tasks on remote Windows-based servers from devices that have access to an Internet connection and a web browser.

Users can access a Windows PowerShell console by using a web browser. When users open the secured Windows PowerShell Web Access website, they can run a web-based Windows PowerShell console after successful authentication, as shown in the following screenshot:

how-use-powershell-web-access-manage-windows-server-img-0

Here are the steps that I followed to test PSWA (PowerShell Web Access).

Step 1 — installing Windows PowerShell Web Access

Run the following command:

PS C:UsersAdministrator> Install-WindowsFeature WindowsPowerShellWebAccess

You should now see the following screen:

how-use-powershell-web-access-manage-windows-server-img-1

Once we install PowerShell Web Access, we need to start to configuring it.

Step 2 – configuring Windows PowerShell Web Access

We will configure Windows PowerShell Web Access by installing the web application and configuring a predefined gateway rule. Now, create just a test certificate and an SSL binding using that certificate for a test environment:

PS C:UsersAdministrator> Install-PswaWebApplication –useTestCertificate

After this, you should see the following screenshot:

how-use-powershell-web-access-manage-windows-server-img-2

Now, set the authorization rule on which all can have rights for PowerShell Web Access; for my test environment, I set it to *, which means all have access:

PS C:UsersAdministrator> Add-PswaAuthorizationRule –ComputerName * -UserName * -ConfigurationName *

This step gives the following output:

how-use-powershell-web-access-manage-windows-server-img-3

Now if you run a Get-PswaAuthorizationRule command, you can see the list of users having access to PSWA:

Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at $19.99/month. Cancel anytime

PS C:UsersAdministrator> Get-PswaAuthorizationRule

The following screenshot shows the output:

how-use-powershell-web-access-manage-windows-server-img-4

Now that PowerShell Web Access is set up, we can access the PSWA page via a web browser. You get an error message, Error! Hyperlink reference not valid. You should see the following options on the screen:

how-use-powershell-web-access-manage-windows-server-img-5

You will receive this error because you are using a test certificate that cannot be validated; click on Continue to this website (not recommended).

You will now reach the following page:

how-use-powershell-web-access-manage-windows-server-img-6

Now enter the username and password to connect to a remote computer, which also accepts IP addresses (specified in computer name block), and voila! You are now logged into the remote console of the server:

how-use-powershell-web-access-manage-windows-server-img-7

Run a hostname command, $psversiontable, and also query wmi for the operating system installed on your remote system, and it indeed shows that you were logged into the correct host and it also had PowerShell v2 installed:

how-use-powershell-web-access-manage-windows-server-img-8

I also wanted to share one more screen along with this example for inactive session timeout which autologged off my session when I was inactive for a certain period of time:

how-use-powershell-web-access-manage-windows-server-img-9

Now let's see a real-world example of PowerShell Web Access. Here's the console when I accessed it from my Android tablet.

So, we can see that with PSWA you can get a fully fledged PowerShell environment on my handheld device:

how-use-powershell-web-access-manage-windows-server-img-10

Summary

In this article, we looked how we used PowerShell Web Access to manage your Windows Server Environment anywhere, anytime, and on any device.

Resources for Article:


Further resources on this subject: