- September 10, 2016
- Posted by: Surender Kumar
- Category: PowerShell
By using PowerShell Web Access, you can use your personal laptops, borrowed computers, tablet or even your mobile, that are not running a Windows-based operating system. 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. The only component required is the PowerShell Web Access Gateway. It is amazing. Isn’t it?
Follow the steps to install PSWA on a server:
Step 1: Add Windows PowerShell Web Access role on server. Open Windows PowerShell and type the following command:
Install-WindowsFeature -Name WindowsPowerShellWebAccess -Computername <server-name> -IncludeManagementTools -Restart
Step 2: Configure the Windows PowerShell Web Access Gateway
You should use a valid SSL certificate if you are deploying this to your production environment. Since I am doing this is a test lab, I will use Test Certificate which is valid for 90 days.
Type the following command:
Now, set the authorization rule on which all can have rights for PowerShell Web Access. If you are configuring this in your production environment, never use * under authorization rule. Instead you must specify a specific computer or group, specific user or group. For my test lab, I will set the ComputerName to DC1 and UserName to admin. If you specify *, it means all computers and all users of my domain will have full access to run any PowerShell command. This is a very dangerous authorization rule and should never been used in production environment.
Add-PswaAuthorizationRule -ComputerName DC1 -UserName admin -ConfigurationName AdminsOnly
Now you can login via admin user account to DC and you can run any PowerShell command as you generally run locally. The browser console also gives you Tab key to perform tab completion.