vSphere PowerCLI Cmdlets Reference

Get-CDDrive

Synopsis

Retrieves virtual CD drives.

Syntax

Get-CDDrive [[-VM] <VirtualMachine[]>] [[-Template] <Template[]>] [[-Snapshot] <Snapshot[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-CDDrive
Remove-CDDrive
Set-CDDrive

Detailed Description

Returns a set of virtual CD drives that belong to the virtual machines, templates, and snapshots specified by the VirtualMachine, Template, and Snapshot parameters. At least one of these parameters must be provided. To specify a server different from the default one, use the -Server parameter.

Parameters

NameDescriptionRequired?Pipeline InputDefault Value
VMSpecify the virtual machines from which you want to retrieve virtual CD drives.falsetrue (ByValue)
TemplateSpecify the virtual machine templates from which you want to retrieve virtual CD drives.falsetrue (ByValue)
SnapshotSpecify the snapshots from which you want to retrieve virtual CD drives.falsetrue (ByValue)
ServerSpecify the vSphere 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-VIServer.falsefalse

Return Type

CDDrive

Notes

Examples

-------------- EXAMPLE 1 --------------

Get-VM -Name VM | Get-CDDrive

Connects to a vSphere server and retrieves the CD drive of the virtual machine named VM.


Copyright © 1998 - 2010 VMware, Inc. All rights reserved.