How to configure the vRanger Console for remote management via Powershell
Requirements:
Powershell 2.0 installed on both vRanger computer and the Management computer
vRanger Console is configured according to the vRanger User's Guide
Configure Powershell to allow remote access. On both the vRanger Console and the Management computer:
1. Open the vRanger Console or launch a CMD prompt as Administrator and launch Powershell
2. Enter the following commands:
set-Item wsman:\localhost\Client\TrustedHosts *
Restart-Service winrm
Setting TrustedHosts to * grants access from any computer. It is best to configure your TrustedHosts using computernames or IP addresses, or ActiveDirectory Group Policy.
3. On the Management computer, test remote connectivity by creating a remote Powershell session
new-psssession -computername <vRanger IP Address>
4. If no errors are reported, confirm that the session exists
get-pssession
5. Close out the session
remove-pssession
Here is an example of a script when using remote PowerShell to manage vRanger. The script will output ESX server information (replace <vRanger IP Address> with the actual IP address of your vRanger computer)
$rconn = New-PSSession -ComputerName <vRanger IP Address>
Invoke-Command -Session $rconn -ScriptBlock {Add-PSSnapin vRanger.API.Powershell}
Invoke-Command -Session $rconn -ScriptBlock {get-inventoryentity -type esxhost}
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center