Instant Windows PowerShell [Instant] — Save 50%
Manage and automate your Windows Server Environment efficiently using PowerShell with this book and ebook
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.)
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:
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:
- Exchange Server 2010 Windows PowerShell: Working with Address Lists [Article]
- So, what is PowerShell 3.0 WMI? [Article]
- Inventorying Servers with PowerShell [Article]
|Manage and automate your Windows Server Environment efficiently using PowerShell with this book and ebook|
eBook Price: $19.99
About the Author :
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.