Get-CDDrive Command | Vmware PowerCLI Reference

Get-CDDrive

This cmdlet 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.

Syntax

Get-CDDrive
[ [-Template ] < Template[] > ]
[ [-Snapshot ] < Snapshot[] > ]
[-Id < String[] > ]
[-Name < String[] > ]
[-ProgressAction < ActionPreference > ]
[-Server < VIServer[] > ]
[-VM < VirtualMachine[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional Template Template[] 1
  • pipeline
  • wildcards
Specifies the virtual machine templates from which you want to retrieve virtual CD drives.
optional Snapshot Snapshot[] 2
  • pipeline
Specifies the snapshots from which you want to retrieve virtual CD drives.
optional Id String[] named
  • wildcards
Specifies the IDs of the CD drives 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 Name String[] named
  • wildcards
Specifies the names of the CD drives you want to retrieve.
optional ProgressAction ActionPreference named
optional Server VIServer[] named
  • wildcards
Specifies the vCenter Server systems 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-VIServer.
optional VM VirtualMachine[] named
  • pipeline
  • wildcards
Specifies the virtual machines from which you want to retrieve virtual CD drives.

Output

VMware.VimAutomation.ViCore.Types.V1.VirtualDevice.CDDrive

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.

Related Commands

CDDrive

This cmdlet retrieves virtual CD drives.

This cmdlet creates a new virtual CD drive.

This cmdlet removes virtual CD drives from their locations.

This cmdlet modifies the configuration of a virtual CD drive.