Syntax
Get-CIVM [[-Name] <String[]>] [-Org <Org[]>] [-OrgVdcNetwork <OrgNetworkBase[]>] [-OrgVdc <OrgVdc[]>] [-VApp <CIVApp[]>] [-Status <CIVAppStatus[]>] [-Server <CIServer[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [<CommonParameters>]Related Commands
Online versionDetailed Description
This cmdlet retrieves virtual machines in the cloud and filters them by the provided parameters.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Name | String[] | Specifies the name of the cloud virtual machines you want to retrieve. | false | false | |
Id | String[] | 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. | true | false | |
InformationAction | ActionPreference | false | false | ||
InformationVariable | String | false | false | ||
Org | Org[] | Specifies from which organizations you want to retrieve virtual machines. | false | true (ByValue) | |
OrgVdc | OrgVdc[] | Specifies the organization vDCs for which you want to retrieve virtual machines. | false | true (ByValue) | |
OrgVdcNetwork | OrgNetworkBase[] | Specifies the organization vDC networks to which the virtual machines are connected. | false | true (ByValue) | |
PipelineVariable | String | false | false | ||
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false | |
Status | CIVAppStatus[] | Specifies the status of the virtual machines you want to retrieve. | false | false | |
VApp | CIVApp[] | Specifies the vApps to which the virtual machines you want to retrieve belong. | false | true (ByValue) |
Return Type
Zero or more CIVM objectsNotes
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).