powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Get-CIVM



NAME
Get-CIVM

SYNOPSIS
Retrieves the virtual machines on the cloud.

SYNTAX
Get-CIVM [[-Name] ] [-Org ] [-OrgNetwork ] [-OrgVdc ] [-VApp ] [
-Status ] [-Server ] []

Get-CIVM -Id [-Server ] []


DESCRIPTION
Retrieves the virtual machines on the cloud and filters them by using the provided parameters.


PARAMETERS
-Name
Specify the name of the cloud virtual machines you want to retrieve.

Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? true

-Org
Specify from which organizations you want to retrieve virtual machines.

Required? false
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-OrgNetwork
Specify the organization networks to which the virtual machines are connected.

Required? false
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-OrgVdc
Specify the organization VDCs for which you want to retrieve virtual machines.

Required? false
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-VApp
Specify the virtual appliances to which the virtual machines you want to retrieve belong.

Required? false
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-Status
Specify the status of the virtual machines you want to retrieve.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-Server
Specify the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the comm
and runs on the default servers. For more information about default servers, see the description of Connect-CIS
erver.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-Id
Specify the Ids of the cloud virtual machines you want to retrieve.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
CIVM


NOTES




-------------- Example 1 --------------

C:\PS>Get-CIVM


Gets all visible virtual machines for the current user.





-------------- Example 2 --------------

C:\PS>Get-CIVM -Name "MyVM"


Gets a single virtual machine by its name.





-------------- Example 3 --------------

C:\PS>Get-CIVApp -Name "*DB*"


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





-------------- Example 4 --------------

C:\PS>Get-CIVM -ID $myVMId


Gets a virtual machine with a given ID.





-------------- Example 5 --------------

C:\PS>Get-CIVM -Org "MyOrganization"


Gets all visible virtual machines within an organization.





-------------- Example 6 --------------

C:\PS>Get-Org -Name Organization | Get-CIVM


Gets all visible virtual machines within an organization.





-------------- Example 7 --------------

C:\PS>Get-CIVM -OrgNetwork "OrgNetwork1"


Gets all visible virtual machines within an organization network.





-------------- Example 8 --------------

C:\PS>Get-OrgNetwork -Name "OrgNetwork1" | Get-CIVM


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





-------------- Example 9 --------------

C:\PS>Get-CIVM -OrgVdc "MyOrgVDC1"


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





-------------- Example 10 --------------

C:\PS>Get-OrgVdc -Name "OrgVdc1" | Get-CIVM


Get all visible virtual machines within an organization's virtual datacenter (pipeline).





-------------- Example 11 --------------

C:\PS>Get-CIUser -Name "Org1Admin1" | Get-CIVM


Gets virtual machines by user (pipeline).





-------------- Example 12 --------------

C:\PS>Get-CIVM -VApp "MyVApp"


Gets virtual machines running a particular VApp.





-------------- Example 13 --------------

C:\PS>Get-CIVApp "MyVApp" | Get-CIVM


Gets virtual machines running a particular VApp (pipeline).





-------------- Example 14 --------------

C:\PS>Get-CIVM -Status "PoweredOn", "Suspended"


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






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Get-CIVM.html