opexxx
5/12/2017 - 3:22 PM

Powershell web access #powershell

Powershell web access #powershell

Powershell Web Access

Diigo bookmarks

Quick for test

  1. Install feature: Install-WindowsFeature –Name WindowsPowerShellWebAccess -IncludeManagementTools -Restart
  2. Setup gateway: Install-PswaWebApplication -UseTestCertificate
  3. Setup access:

    After Windows PowerShell Web Access is installed and the gateway is configured, users can open the sign-in page in a browser, but they cannot sign in until the Windows PowerShell Web Access administrator grants users access explicitly Add-PswaAuthorizationRule -ComputerName * -UserName * -ConfigurationName * The ConfigurationName must point to existing configuration session.

Notes

How to manually create signed certificate in Windows

  1. Create in.txt

    [NewRequest] 
    Subject="CN=<server.computer.domain>"
    RequestType=Cert
    
  2. certreq.exe -new in.txt

  3. Its added to Remote Desktop store, move it to the Personal certificate so that IIS can see it.

    # Via certutil, show Personal store, will also show the one created with UseTestCertificate
    certutil -viewstore my 
    
    # Via Cert drive
    ls Cert:\LocalMachine -Recurse | ? Subject -like '*server*'
    
    # Move to Personal store
    mv 'Cert:\LocalMachine\Remote Desktop\20E7C788D547FE6DEC7B4A420F55C2B352BF5EF2' Cert:\LocalMachine\My