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.
Description: Install and Use Windows PowerShell Web Access
Installing using Powershell
Install-WindowsFeature –Name WindowsPowerShellWebAccess -IncludeManagementTools -Restart
Installing using the Add Roles and Features Wizard:
Setting it up.
There are 2 basic modes and a third to remove the PswaWebApplication Again.:
- 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 –webApplicationName myWebApp
- 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:
- Removing PswaWebApplication
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
- Open the IIS Manager, click on your main site and dobbelt-click Server Certificates.
- Click Import, browse to your certificate, type Password and leave it at “Personal” as the “Certificate Store”
- Assigning Certificate to our site:
Select Default Web Site, Bindings. Edit https and select your certificate. Click OK and Close.
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 *
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:
Install and Use Windows PowerShell Web Access http://technet.microsoft.com/en-us/library/hh831611.aspx
PowerShell Web Access: Reconfiguration: http://www.petri.co.il/powershell-web-access-reconfiguration.htm