Set-CDDrive

Synopsis

Changes the configuration of a virtual CD drive.

Syntax

Set-CDDrive [-CD] <CDDrive[]> [-IsoPath <String>] [-HostDevice <String>] [-NoMedia] [-StartConnected [<Boolean>]] [-Connected [<Boolean>]] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Get-CDDrive
New-CDDrive
Remove-CDDrive

Detailed Description

Updates a virtual CD drive. If an ISO location is provided, sets the CD to point to the ISO. Changes the StartConnected and Connected flags if StartConnected and/or Connected is set. If NoMedia parameter is set to $true, removes the CD drive's media backing and disconnects it. Note that the Connected parameter can be specified only if the corresponding virtual machine is powered on.

Parameters

NameDescriptionRequired?Pipeline InputDefault Value
CDSpecify the virtual CD drive you want to configure.truetrue (ByValue)
IsoPathSpecify the datastore path to ISO (CD image) file that backs the virtual CD drive. Do not use this parameter at the same time with the HostDevice and NoMedia parameters.falsefalse
HostDeviceSpecify the path to the CD drive on the host which backs this virtual CD drive. Do not set this parameter at the same time with the ISOPath and NoMedia parameters.falsefalse
NoMediaIndicate that the CD drive has no media. Do not use this parameter at the same time with the ISOPath or HostDevice parameters.falsefalse
StartConnectedIndicate that the virtual CD drive starts connected when the virtual machine associated with it powers on.falsefalse
ConnectedIndicate that the virtual CD drive is connected after its creation. This parameter can be specified only if the corresponding virtual machine is powered on.falsefalse
WhatIfIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse
ConfirmIndicate that the cmdlet asks for confirmation before running.falsefalse

Input Type

Return Type

VMware.VimAutomation.Types.CDDrive

Notes

Examples

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

C:\PS>$cd = New-CDDrive -VM MyVM -ISOPath "[sof-20666-esx:storage1] ISO\testISO.
iso"

Set-CDDrive -CD $cd -NoMedia


Creates a CD drive on the MyVM virtual machine and attaches testISO.iso, previou
sly uploaded.
Then disconnects the ISO.

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