powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Set-CDDrive



NAME
Set-CDDrive

SYNOPSIS
Changes the configuration of a virtual CD drive.

SYNTAX
Set-CDDrive [-CD] [-IsoPath ] [-HostDevice ] [-NoMedia] [-StartConnected []] [
-Connected []] [-WhatIf] [-Confirm] []


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


PARAMETERS
-CD
Specify the virtual CD drive you want to configure.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-IsoPath
Specify 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.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-HostDevice
Specify the path to the CD drive on the host which backs this virtual CD drive. Do not set this parameter at th
e same time with the ISOPath and NoMedia parameters.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-NoMedia
Indicate that you want to detach from the CD drive any type of connected media - ISO from datastore or host dev
ice. Do not use this parameter at the same time with the ISOPath or HostDevice parameters.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-StartConnected []
Indicate that the virtual CD drive starts connected when the virtual machine associated with it powers on.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Connected []
Indicate that the virtual CD drive is connected after its creation. This parameter can be specified only if the
corresponding virtual machine is powered on.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf
Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modi
fied.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

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


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
CDDrive


NOTES




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

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

Set-CDDrive -CD $cd -NoMedia


Creates a CD drive on the VM virtual machine and attaches testISO.iso, previously uploaded.
Then disconnects the ISO.






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Set-CDDrive.html
Get-CDDrive
New-CDDrive
Remove-CDDrive