
Install-PSWAWebApplication can actually create a self-signed certificate and even automatically create the IIS binding for you. PSWA requires SSL/TLS, so you need to decide which way you'll address this requirement: We'll use Install-PSWAWebApplication to provision our new IIS website.
#What is windows powershell used for windows#
Once you get over that hump, mosey on over to your PSWA gateway box ( mem1 in my example), start an elevated Windows PowerShell console session, and issue the following one-liner: Install-WindowsFeature -Name WindowsPowerShellWebAccess -IncludeManagementTools -Restart In other words, we'll tunnel through the PSWA gateway to get to dc1.įirst the possibly bad news: Installing the PowerShell Web Access role involves a server restart if you don't have the IIS bits already installed. Windows Server 2012 R2 domain controller that is our ultimate management target. Windows Server 2012 R2 member server that will be our PSWA gateway. For this example, my environment uses the computers described in the following table. The best way to learn how PSWA works is to set it up and work with it. As Figure 1 shows, as long as you have access to a PSWA jump box, and the jump box has permissions to the screened subnet, you can accomplish your goal.įigure 1 PowerShell Web Access serves as an excellent jump box to manage hosts that are normally out of reach. One common use case I've seen is employing the PSWA gateway as a "jump box." Imagine that you want to send PowerShell commands to one or more hosts located on a screened, protected subnet, and firewall/security rules prevent you from interacting with the secure hosts directly. PSWA combines an Internet Information Services (IIS) web application with the magic of Windows PowerShell remoting to allow administrators to access the PowerShell console host ( powershell.exe) from a web browser. PowerShell Web Access (PSWA) is a built-in role in Windows Server 2012 and Windows Server 2012 R2.
#What is windows powershell used for how to#
In this article, you'll learn how to deploy a PowerShell Web Access (PSWA) gateway to support "PowerShell through a pinhole." Understanding PowerShell Web Access (PSWA) I'm leading you a bit, of course, because you absolutely can access a PowerShell console session from just about any desktop or mobile browser in the world that supports cookies, SSL/TLS, and JavaScript-which is the vast majority of them, of course.


Wouldn't it be awesome if you could just send that PowerShell instruction directly from your smartphone? Sure, you can walk through the PowerShell with your colleague, but the chances are good that he or she is PowerShell-phobic. The trouble is that you're on the beach with only your smartphone. It turns out one of your infrastructure servers is messed up, and the fix can be accomplished by running a single PowerShell pipeline. Imagine that you're on vacation with your family, enjoying the sunshine, when you receive an emergency call from your IT department colleague back at the office. Windows PowerShell in 24 Hours, Sams Teach Yourself
