< Back

New-CDDrive

Sun Jan 19, 2020 6:59 pm

NAME New-CDDrive



SYNOPSIS

This cmdlet creates a new virtual CD drive.





SYNTAX

New-CDDrive [-VM] <VirtualMachine> -ContentLibraryIso <ContentLibraryItem> [-Server <VIServer[]>] [-Confirm]

[-WhatIf] [<CommonParameters>]



New-CDDrive [-VM] <VirtualMachine> [-HostDevice <String>] [-IsoPath <String>] [-Server <VIServer[]>]

[-StartConnected] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

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.





PARAMETERS

-ContentLibraryIso <ContentLibraryItem>

Specifies the content library item of type ISO that you want to mount on the new CD drive.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-HostDevice <String>

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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-IsoPath <String>

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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Server <VIServer[]>

Specifies the vCenter Server systems on which you want to run the cmdlet. If no 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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-StartConnected [<SwitchParameter>]

Indicates that the virtual CD drive starts connected when the virtual machine associated with it powers on.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-VM <VirtualMachine>

Specifies the virtual machine to which the new virtual CD drive belongs. Passing multiple values to this

parameter is obsolete.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



-Confirm [<SwitchParameter>]

If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false,

the cmdlet runs without asking for user confirmation.



Required? false

Position? named

Default value $true

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are

modified.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

The one or more newly created CDDrive objects







NOTES









-------------------------- 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 LINKS

Online Version: https://code.vmware.com/doc/preview?id= ... Drive.html

Get-CDDrive

Remove-CDDrive

Set-CDDrive