Friday, May 1, 2015

Installing and configuring PowerShell Web Access

If you want to install and configure PowerShell Web Access, you will definitely want to read these 2 MSDN Articles:


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

Use the Web-based Windows PowerShell Console
https://technet.microsoft.com/en-us/library/hh831417.aspx

However, even after reading both of these articles, I could not set this up on one of my servers in a Workgroup!

After going through an additional 2 articles, I finally came up with a useful PowerShell script that will set up everything for you to make the process as simple as possible:

Enable and Use Remote Commands in Windows PowerShell
https://technet.microsoft.com/en-us/magazine/ff700227.aspx

Step-By-Step: Deploying PowerShell Web Access
$ComputerName = $env:COMPUTERNAME
$UserDomain = $env:USERDOMAIN
$UserName = $env:USERNAME
$DomainQualifiedUserName = "$UserDomain\$UserName"
$ConfigurationName = "Microsoft.PowerShell"
 
Install-WindowsFeature –Name WindowsPowerShellWebAccess -ComputerName $ComputerName -IncludeManagementTools -Restart
Install-PswaWebApplication -UseTestCertificate
Write-Host $DomainQualifiedUserName
Enable-PSRemoting -Force
Add-PswaAuthorizationRule –UserName $DomainQualifiedUserName -ComputerName $ComputerName -ConfigurationName $ConfigurationName


No comments:

Post a Comment