Submit a ticketCall us

Looking to compare latest NPM features with previous versions of NPM?
The NPM new feature summary offers a comparison of new features and improvements offered with this release.

 

 

 

 

Home > Success Center > Virtualization Manager (VMAN) > VMAN 7.1 Administrator Guide > Access Virtualization Manager through the PowerShell client

Access Virtualization Manager through the PowerShell client

Created by Caroline Juszczak, last modified by MindTouch on Jun 23, 2016

Views: 223 Votes: 0 Revisions: 3

With SolarWinds Virtualization Manager Power CLI, you can access Virtualization Manager data in Microsoft PowerShell.

Download the PowerShell Client installer from the SolarWinds Customer Portal.

  1. Log in to the SolarWinds Customer Portal.
  2. Click License Management > License Management.
  3. Select Virtualization Manager from the product list.
  4. From the Agent Downloads section, download the PowerShell Client for Virtualization Manager.
  5. When the download is complete, install PowerCLI.

Connect to Virtualization Manager from PowerShell

To connect to the SolarWinds Virtualization Manager server, use the Connect-H9Server cmdlet. For example, Connect-H9Server akutz-hyper9 admin admin.

This creates a connection to the SolarWinds Virtualization Manager server akutz-hyper9 using the credentials admin/admin.

Search in Virtualization Manager

When you are connected to Virtualization Manager, you always have an active query. At first, the query is empty, and returns no results. Run Set-H9Query to set your active query and return a set of results. For example, Set-H9Query * VirtualMachine.

This command sets your active query to all known virtual machines, and returns the number of results. The first parameter is a query, and the optional second parameter is the object type. After defining the query, run this command to view items 1 through 20 of the results:

Show-H9Results 1 20

The following command returns the same result:

Show-H9Results | Select-Object -first 20

The parameters are optional and you can also show all the items in the result set.

Displaying large result sets can take a long time.

Use configuration item references

Operations you can perform with Virtualization Manager can involve a large number of objects. Because of this, most Virtualization Manager cmdlets accept and return configuration item references. These are pointers to the actual data stored by SolarWinds Virtualization Manager.

To see the actual data, use the Get-H9Doc cmdlet:

$xml = Get-H9Result 1 1 | Get-H9Doc

This returns an [xml] object, for example:

PS C:\> $xml.virtualMachine.cpuAllocation

limit reservation shares sharesLevel

----- ----------- ------ -----------

45351 0 500 low

Install VMware vSphere PowerCLI

You can also install the VMware vSphere PowerCLI to take advantage of the integration of SolarWinds Virtualization Manager and VMware. Download the VMware vSphere PowerCLI from the VMware website.

You can use the ConvertTo-H9Ref command to retrieve a configuration item reference for a VMware object. For example, Get-Vm | ConvertTo-H9Ref | Add-H9List.

This command retrieves all known virtual machines through the vSphere PowerCLI, converts each to a SolarWinds Virtualization Manager reference, and adds them to the active list.

This command works for managed objects that SolarWinds Virtualization Manager recognizes:

  • Virtual machines
  • Host servers
  • Clusters
  • Data stores
  • Applications
 
Last modified
04:21, 23 Jun 2016

Tags

Classifications

Public