Server 2012 – Installing PowerShell Web Access

Time has come to stop logging into our server using RDP and then managing it using Powershell.

Instead we are going to install remote web access for powreshell.

Source: http://technet.microsoft.com/en-us/library/jj592894.aspx

Description: Install and Use Windows PowerShell Web Access

More: Use the Web-based Windows PowerShell Console

Installing using Powershell

Install-WindowsFeature –Name WindowsPowerShellWebAccess -IncludeManagementTools -Restart
01

Installing using the Add Roles and Features Wizard:

02

Setting it up.

There are 2 basic modes and a third to remove the PswaWebApplication Again.:

  1. If you have a certificate you want to use, you simply run this command and install the certificate using IIS afterward. Default Applicationname is pswa. If you want to define your own Applicationname, you need to add the switch “-WebapplicationName [name]
    Install-PswaWebApplication
    Install-PswaWebApplication –webApplicationName myWebApp

    setup01
  2. If you do not have a certificate and this is for lab testing only, you can run install the PswaWebApplication and a test certificate in one go:
    Install-PswaWebApplication -UseTestCertificate
    setup02
  3. Removing PswaWebApplication
    Uninstall-PswaWebApplication
    setup03
Installing Certificate using IIS.

If you didn’t install using the -UseTestCertificate we need to install a certificate. It’s rather simple, and I’ll do it using the Internet Information Service (IIS) Manager

  1. Open the IIS Manager, click on your main site and dobbelt-click Server Certificates.
    01-iis
  2. Click Import, browse to your certificate, type Password and leave it at “Personal” as the “Certificate Store
    02-iis
  3. Assigning Certificate to our site:
    Select Default Web Site, Bindings. Edit https and select your certificate. Click OK and Close.
    03-iis
Creating Access Rule:

In order to use the Web Access we need to setup an access rule. In this example we allow all users from any computer with any configuration. Meaning it’s for Lab testing only. Second line is just for removing it Again.
Add-PswaAuthorizationrule -Username * -ComputerName * -ConfigurationName *
Remove-PswaAuthorizationrule

accessrule

If used in production you should (must) create a more restrictive Authorization Rule. More info can be found here: http://technet.microsoft.com/en-us/library/jj592890.aspx

Go to your site:

Now enter the url in your browser:

goto

More info:

Install and Use Windows PowerShell Web Access http://technet.microsoft.com/en-us/library/hh831611.aspx

Install-PswaWebApplication http://technet.microsoft.com/en-us/library/jj592894.aspx

PowerShell Web Access: Reconfiguration: http://www.petri.co.il/powershell-web-access-reconfiguration.htm

Posted in IIS, Powershell, Server 2012

Leave a Reply