Export (0) Print
Expand All
Expand Minimize

Set-VMDvdDrive

Published: August 15, 2012

Updated: September 5, 2013

Applies To: Windows Server 2012

Set-VMDvdDrive

Configures a virtual DVD drive.

Syntax

Parameter Set: VMName
Set-VMDvdDrive [-VMName] <String> [[-ControllerNumber] <Int32> ] [[-ControllerLocation] <Int32> ] [[-Path] <String> ] [-AllowUnverifiedPaths] [-ComputerName <String[]> ] [-Passthru] [-ResourcePoolName <String> ] [-ToControllerLocation <Int32> ] [-ToControllerNumber <Int32> ] [ <CommonParameters>]

Parameter Set: Object
Set-VMDvdDrive [-VMDvdDrive] <DvdDrive[]> [[-Path] <String> ] [-AllowUnverifiedPaths] [-Passthru] [-ResourcePoolName <String> ] [-ToControllerLocation <Int32> ] [-ToControllerNumber <Int32> ] [ <CommonParameters>]




Detailed Description

The Set-VMDvdDrive cmdlet configures the controller and location of a virtual DVD drive.

Parameters

-ComputerName<String[]>

Specifies one or more Hyper-V hosts on which the DVD drive is to be configured. NetBIOS names, IP addresses, and fully-qualified domain names are allowable. The default is the local computer — use “localhost” or a dot (“.”) to specify the local computer explicitly.


Aliases

none

Required?

false

Position?

named

Default Value

.

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ControllerLocation<Int32>

Specifies the IDE controller location of the DVD drives to be configured. If not specified, DVD drives in all controller locations are configured.


Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ControllerNumber<Int32>

Specifies the IDE controller of the DVD drives to be configured. If not specified, DVD drives attached to all controllers are configured.


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Passthru

Specifies that a Microsoft.Virtualization.Powershell.DvdDrive object is to be passed through to the pipeline representing the virtual DVD drive to be configured.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path<String>

Specifies the path to the ISO file or physical DVD drive that will serve as media for the virtual DVD drive.


Aliases

none

Required?

false

Position?

4

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

true

-ResourcePoolName<String>

Specifies the friendly name of the ISO resource pool to which this DVD drive is to be associated.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMDvdDrive<DvdDrive[]>

Specifies the virtual DVD drive to be configured.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-AllowUnverifiedPaths

Specifies that no error is to be thrown if the specified path is not verified as accessible by the cluster. This parameter is applicable to clustered virtual machines.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ToControllerLocation<Int32>

Specifies the controller location to which this virtual DVD drive should be moved.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ToControllerNumber<Int32>

Specifies the controller number to which this VMDvdDrive should be moved.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMName<String>

Specifies the name of the virtual machine on which the DVD drive is to be configured.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

true

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • None by default; Microsoft.Virtualization.Powershell.DvdDrive if –PassThru is specified.


Examples

Example 1

Configures the virtual DVD drive of virtual machine TestVM to use Test.iso as its media.


PS C:\> Set-VMDvdDrive -VMName TestVM -Path .\Windows7.iso

Example 2

Configures the virtual DVD drive at IDE 1,0 of virtual machine TestVM to use no media. (This ejects any existing media from the virtual DVD drive.)


PS C:\> Set-VMDvdDrive -VMName TestVM -ControllerNumber 1 -ControllerLocation 0 -Path $null

Example 3

Moves virtual DVD drive from IDE 1,0 to IDE 1,1 on virtual machine TestVM.


PS C:\> Get-VMDvdDrive -VMName TestVM -ControllerNumber 1 -ControllerLocation 0 | Set-VMDvdDrive -ToControllerLocation 1

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft