martes, 22 de marzo de 2016

Powershell Web Access

Windows Powershell Web Access


I was thinking about how to connect into a Powershell console from a Mac or Linux computer, or just remotely from any public computer avoiding to do Remote Desktop.

One of the options is SSH (Secure SHell) for Powershell, to be honest I didn't test it yet but I am excited about to do it.

Another option is something call Windows Powershell Web Access.

So, I will be able to connect into a Powershell console from any computer that has a Web browser supporting Java Script.

Configuring Windows Powershell Web Access

  1. First of all we need to add the feature Powershell Web Access running the following command:
  2. PS:\>Install-WindowsFeature -Name WindowsPowershellWebAccess
    
    
  3. Ok, now we need to configure the Powersherll Web Access running the following command:

    PS:\>Install-PswaWebApplication -UseTestCertificate -WebApplicationName WebPS
    

    -UseTestCertificate: creates a certificate for testing enviroments.
    If you want to configure a production environment you should use a certificate signed by a CA.

    -WebApplicationName:The name of the ends of the website, in the example above is https://<ServerName>/WebPS 


















    More about Install-PswaWebApplication command here.
  4. 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.

    In the following command I'm providing access to all the users from any computer. 
  5. PS:\>Add-PswaAuthorizationRule –UserName * -ComputerName * -ConfigurationName *
    








  6. Then we need to browse our server following the link of our Powershell Web Access, by default is https://<ServerName>/pswa/
    Also, as we had showed above, you can specify your own Powershell Web Application name.

    Then, we need to login using any kind of user credentials with access to the server.
    And in Computer name: we need to write the server that we want to connect to.

  7. Enjoy powershell form the web!

No hay comentarios:

Publicar un comentario