Get-CIVM Command | Vmware PowerCLI Reference

Get-CIVM

This cmdlet retrieves virtual machines in the cloud and filters them by the provided parameters.

Syntax

Get-CIVM
-Id < String[] >
[-ProgressAction < ActionPreference > ]
[-Server < CIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Id String[] named
Specifies the IDs of the cloud virtual machines you want to retrieve. Note: When a list of values is specified for the Id parameter, the returned objects would have an ID that matches exactly one of the string values in that list.
optional ProgressAction ActionPreference named
optional Server CIServer[] named
  • wildcards
Specifies the cloud servers on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer.

Output

VMware.VimAutomation.Cloud.Types.V1.CIVM

Examples

Example 1

Get-CIVM

Gets all visible virtual machines for the current user.

Example 2

Get-CIVM -Name "MyVM"

Gets a single virtual machine by its name.

Example 3

Get-CIVApp -Name "*DB*"

Gets all virtual machines that match a defined string by name.

Example 4

Get-CIVM -ID $myVMId

Gets a virtual machine with a given ID.

Example 5

Get-CIVM -Org "MyOrganization"

Gets all visible virtual machines within an organization.

Example 6

Get-CIVM -OrgNetwork "OrgNetwork1"

Gets all visible virtual machines within an organization network.

Example 7

Get-OrgNetwork -Name "OrgNetwork1" | Get-CIVM

Gets all visible virtual machines within an organization network (pipeline).

Example 8

Get-CIVM -OrgVdc "MyOrgVDC1"

Gets all visible virtual machines within an organization's virtual datacenter.

Example 9

Get-OrgVdc -Name "OrgVdc1" | Get-CIVM

Get all visible virtual machines within an organization's virtual datacenter by using a pipeline syntax.

Example 10

Get-CIVM -VApp "MyVApp"

Gets virtual machines running a particular VApp.

Example 11

Get-CIVApp "MyVApp" | Get-CIVM

Gets virtual machines running a particular VApp (pipeline).

Example 12

Get-CIVM -Status "PoweredOn", "Suspended"

Gets virtual machines by status (all powered on and suspended VMs).

Related Commands

CIVM

This cmdlet retrieves virtual machines in the cloud.

This cmdlet creates a new cloud virtual machine.

This cmdlet resets the specified virtual machine.

This cmdlet powers on the specified virtual machine.

This cmdlet powers off the specified virtual machine.

This cmdlet suspends the specified virtual machine.

CIVMGuest

This cmdlet restarts the guest operating system of the specified virtual machine.

This cmdlet shuts down the guest operating system of the specified virtual machine.

CIVMTemplate

This cmdlet retrieves the virtual machine templates in the cloud.