How to use PowerShell Web Access to manage Windows Server

Exclusive offer: get 50% off this eBook here
Instant Windows PowerShell [Instant]

Instant Windows PowerShell [Instant] — Save 50%

Manage and automate your Windows Server Environment efficiently using PowerShell with this book and ebook

$19.99    $10.00
by Vinith Menon | October 2013 | Enterprise Articles Networking & Telephony

In this article by Vinith Menon, the author of Instant Windows PowerShell, we will learn how to to use PowerShell Web Access to manage your Windows Server Environment anywhere, anytime, and on any device. PowerShell Web Access, a web-based Windows PowerShell console, and Windows PowerShell commands and scripts can be run from a Windows PowerShell console in a web browser; with no Windows PowerShell, remote management software, or browser plug-in installation becomes necessary on the client device.

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

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:\Users\Administrator> Install-WindowsFeature WindowsPowerShellWebAccess

You should now see the following screen:

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:\Users\Administrator> Install-PswaWebApplication –useTestCertificate

After this, you should see the following screenshot:

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:\Users\Administrator> Add-PswaAuthorizationRule –ComputerName * -UserName * -ConfigurationName *

This step gives the following output:

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

PS C:\Users\Administrator> Get-PswaAuthorizationRule

The following screenshot shows the output:

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:

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:

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:

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:

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:

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:

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:


Instant Windows PowerShell [Instant] Manage and automate your Windows Server Environment efficiently using PowerShell with this book and ebook
Published: October 2013
eBook Price: $19.99
See more
Select your format and quantity:

About the Author :


Vinith Menon

Vinith has over six years of experience in the IT industry. At the beginning of his career, he worked with Wipro Technologies as a senior systems engineer, managing a datacenter consisting of Windows servers and VMware virtualized environment. He was also extensively involved in automation using VBScripting.

Later in his career, he worked with Accenture as a senior software engineer, managing Microsoft Hyper-V and NetApp storage environment for Avanade.

He has done automation for tasks that required manual work using System Center Orchestrator and integrated them with PowerShell to deliver outstanding automation results for Avanade.

He also has experience in building Orchestrator Integration Packs using PowerShell for Microsoft System Center Orchestrator. He has extensive knowledge in Hyper-V, SCVMM, and other system center technologies. He has deep technical expertise in PowerShell scripting, Server Administration, Network Management, and Active Directory.

He is currently working as a technical marketing engineer with the Microsoft Business Unit at NetApp. He also works closely with the NetApp Engineering and Product Management team and helps in the automation of various tasks using PowerShell scripting, Microsoft Hyper-V virtualization, and System Center Technologies, such as SCSM, SCOM, and SCORCH 2012.

As a subject matter expert in Hyper-V and PowerShell, he blogs and supports the NetApp PowerShell community.

He is very passionate about automation and PowerShell scripting, and you can find him frequently blogging about virtualization, PowerShell, and automation on his personal blog, www.vinithmenon.com.

He is a Microsoft-certified IT professional and also holds a NetApp-certified Data Management Professional certification.

He has also taken sessions at the PSBUG (PowerShell Bangalore users group) about PowerShell, cloud computing, and server virtualization.

Books From Packt


 Instant Windows Powershell 3.0 Windows Management Instrumentation Starter [Instant]
Instant Windows Powershell 3.0 Windows Management Instrumentation Starter [Instant]

Microsoft Windows PowerShell 3.0 First Look
Microsoft Windows PowerShell 3.0 First Look

Microsoft SharePoint 2010 and Windows PowerShell 2.0: Expert Cookbook
Microsoft SharePoint 2010 and Windows PowerShell 2.0: Expert Cookbook

 Windows Server 2012 Automation with PowerShell Cookbook
Windows Server 2012 Automation with PowerShell Cookbook

 Windows Server 2012 Unified Remote Access Planning and Deployment
Windows Server 2012 Unified Remote Access Planning and Deployment

SQL Server 2012 with PowerShell V3 Cookbook
SQL Server 2012 with PowerShell V3 Cookbook

 Microsoft Exchange Server 2013 PowerShell Cookbook: Second Edition
Microsoft Exchange Server 2013 PowerShell Cookbook: Second Edition

 PowerShell 3.0 Advanced Administration Handbook
PowerShell 3.0 Advanced Administration Handbook


No votes yet

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
i
V
t
f
G
2
Enter the code without spaces and pay attention to upper/lower case.
Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software