Establishing a remote Horizon PowerCLI session

Once WinRM is enabled, you can connect to the Horizon connection server remotely over a PowerShell session. The following steps describe how to establish a remote PowerShell session and then enable the Horizon PowerCLI commands:

  1. Open a PowerShell window on the computer that you will use to remotely manage VMware Horizon.
  2. Use the following command to initiate a remote PowerShell session. You will need to provide the FQDN of the Horizon connection server—a user ID that has administrative access to both the Horizon and the connection server—and include the -UseSSL option:
    Enter-PSSession -ComputerName “ConnectionServerFQDN“ –UseSSL -
Credential “domainusername“
  1. The following screenshot shows an example of this command in our test environment:

  1. A Windows PowerShell credential request window will open, as shown in the following screenshot; provide the password for the user account specified in the -Credential option of the previous step and click on OK:

  1. The PowerShell window will now display a command prompt that includes the name of the Horizon connection server, as shown in the following figure. You will now be running a PowerShell session on this server from the local drive indicated in the console. You can change drives by selecting another drive letter exactly as you would if you were logged on diectly using the console on the Horizon connection server:

  1. Switch to the following directory on the Horizon connection server; this folder path assumes that the Horizon connection server was installed in the default program FilesVMwareVMware ViewServerextrasPowerShell directory.
  2. Execute the following command to run the script that will load the Horizon PowerCLI command:
    .Add-snapin.ps1

Once the script has run completely, the text Welcome to VMware View PowerCLI should appear, as shown in the following screenshot. You should not be able to use PowerCLI to remotely manage the Horizon connection server.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.4.44