New-CDDrive
This cmdlet creates a new virtual CD drive for each of the provided virtual machines. If an ISO location is provided, sets the CD to point to the ISO.
Syntax
-VM
<VirtualMachine>
[-HostDevice <String>]
[-IsoPath <String>]
[-Server <VIServer[]>]
[-StartConnected]
[CommonParameters]
[-HostDevice <String>]
[-IsoPath <String>]
[-Server <VIServer[]>]
[-StartConnected]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
VirtualMachine | named |
|
Specifies the virtual machine to which the new virtual CD drive belongs. Passing multiple values to this parameter is obsolete. | optional |
|
String | named |
|
Specifies the path to the CD drive on the virtual machine host that backs the virtual CD drive. Do not set this parameter if the ISOPath parameter is set. | optional |
|
String | named |
|
Specifies the datastore path to the ISO (CD image) file that backs the virtual CD drive. Do not set this parameter if the HostDevice parameter is set. | optional |
|
VIServer[] | named |
|
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 |
|
SwitchParameter | named |
|
Indicates that the virtual CD drive starts connected when the virtual machine associated with it powers on. |
-ContentLibraryIso
<ContentLibraryItem>
-VM <VirtualMachine>
[-Server <VIServer[]>]
[CommonParameters]
-VM <VirtualMachine>
[-Server <VIServer[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
ContentLibraryItem | named |
|
Specifies the content library item of type ISO that you want to mount on the new CD drive. | required |
|
VirtualMachine | named |
|
Specifies the virtual machine to which the new virtual CD drive belongs. Passing multiple values to this parameter is obsolete. | optional |
|
VIServer[] | named |
|
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. |
Output
VMware.VimAutomation.ViCore.Types.V1.VirtualDevice.CDDrive
Examples
Example 1
New-CDDrive -VM $vm -ISOPath "Path_to_ISO\test.iso"
Creates a CD drive on the specified virtual machine and attach an ISO image to it.
Related Commands
CDDrive
This cmdlet retrieves virtual CD drives.
This cmdlet modifies the configuration of a virtual CD drive.
This cmdlet removes virtual CD drives from their locations.
This cmdlet creates a new virtual CD drive.