New-SCVirtualDiskDrive

Creates a virtual disk drive object.

Syntax

New-SCVirtualDiskDrive [-AnyStorageDisk] [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-IDE]
 [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification>]
 [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume] [-VMMServer <ServerConnection>] -VMTemplate <Template>
 [-VirtualHardDiskFormatType <VHDFormatType>] [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-AnyStorageDisk] [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>]
 [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-ReturnImmediately] [-RunAsynchronously] [-SCSI]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 [-VMMServer <ServerConnection>] -VMTemplate <Template> [-VirtualHardDiskFormatType <VHDFormatType>]
 [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-AnyStorageDisk] [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-IDE]
 -JobGroup <Guid> [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-ReturnImmediately] [-RunAsynchronously]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 [-VMMServer <ServerConnection>] [-VirtualHardDiskFormatType <VHDFormatType>] [-VolumeType <VolumeType>]
 [<CommonParameters>]
New-SCVirtualDiskDrive [-AnyStorageDisk] [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] -JobGroup <Guid>
 [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-ReturnImmediately] [-RunAsynchronously] [-SCSI]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 [-VMMServer <ServerConnection>] [-VirtualHardDiskFormatType <VHDFormatType>] [-VolumeType <VolumeType>]
 [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-Differencing] -FileName <String>
 [-IDE] [-JobGroup <Guid>] [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] -ParentVirtualHardDiskPath <String> [-Path <String>]
 [-ReturnImmediately] [-RunAsynchronously] [-SCSI] [-StorageClassification <StorageClassification>]
 [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume] [-VM <VM>] [-VMMServer <ServerConnection>]
 [-VirtualHardDiskFormatType <VHDFormatType>] [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-Dynamic] -FileName <String>
 [-IDE] [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-Path <String>] [-ReturnImmediately] [-RunAsynchronously]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 -VM <VM> [-VMMServer <ServerConnection>] [-VirtualHardDiskFormatType <VHDFormatType>]
 -VirtualHardDiskSizeMB <Int64> [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-Dynamic] -FileName <String>
 [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-Path <String>] [-ReturnImmediately] [-RunAsynchronously] [-SCSI]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 -VM <VM> [-VMMServer <ServerConnection>] [-VirtualHardDiskFormatType <VHDFormatType>]
 -VirtualHardDiskSizeMB <Int64> [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-Dynamic] -FileName <String>
 [-IDE] [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification>]
 [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume] [-VMMServer <ServerConnection>] -VMTemplate <Template>
 [-VirtualHardDiskFormatType <VHDFormatType>] -VirtualHardDiskSizeMB <Int64> [-VolumeType <VolumeType>]
 [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-Dynamic] -FileName <String>
 [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-ReturnImmediately] [-RunAsynchronously] [-SCSI]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 [-VMMServer <ServerConnection>] -VMTemplate <Template> [-VirtualHardDiskFormatType <VHDFormatType>]
 -VirtualHardDiskSizeMB <Int64> [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-Dynamic] -FileName <String>
 [-IDE] -JobGroup <Guid> [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-Path <String>] [-ReturnImmediately] [-RunAsynchronously]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 [-VMMServer <ServerConnection>] [-VirtualHardDiskFormatType <VHDFormatType>] -VirtualHardDiskSizeMB <Int64>
 [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-Dynamic] -FileName <String>
 -JobGroup <Guid> [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-Path <String>] [-ReturnImmediately] [-RunAsynchronously]
 [-SCSI] [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>]
 [-SystemVolume] [-VMMServer <ServerConnection>] [-VirtualHardDiskFormatType <VHDFormatType>]
 -VirtualHardDiskSizeMB <Int64> [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-FileName <String>]
 [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-Path <String>] [-ReturnImmediately] [-RunAsynchronously] [-SCSI]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 -VM <VM> [-VMMServer <ServerConnection>] -VirtualHardDisk <StandaloneVirtualHardDisk>
 [-VirtualHardDiskFormatType <VHDFormatType>] [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-FileName <String>] [-IDE]
 [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-Path <String>] [-ReturnImmediately] [-RunAsynchronously]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 -VM <VM> [-VMMServer <ServerConnection>] -VirtualHardDisk <StandaloneVirtualHardDisk>
 [-VirtualHardDiskFormatType <VHDFormatType>] [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-FileName <String>]
 -JobGroup <Guid> [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-Path <String>] [-ReturnImmediately] [-RunAsynchronously]
 [-SCSI] [-SharedStorage <Boolean>] [-StorageClassification <StorageClassification>]
 [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume] [-VMMServer <ServerConnection>]
 -VirtualHardDisk <StandaloneVirtualHardDisk> [-VirtualHardDiskFormatType <VHDFormatType>]
 [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-FileName <String>] [-IDE]
 -JobGroup <Guid> [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-Path <String>] [-ReturnImmediately] [-RunAsynchronously]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 [-VMMServer <ServerConnection>] -VirtualHardDisk <StandaloneVirtualHardDisk>
 [-VirtualHardDiskFormatType <VHDFormatType>] [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-FileName <String>]
 [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-Path <String>] [-ReturnImmediately] [-RunAsynchronously] [-SCSI]
 [-StorageClassification <StorageClassification>] -StorageDisk <StorageDisk>
 [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume] -VM <VM> [-VMMServer <ServerConnection>]
 [-VirtualHardDiskFormatType <VHDFormatType>] [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-FileName <String>]
 -JobGroup <Guid> [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-Path <String>] [-ReturnImmediately] [-RunAsynchronously]
 [-SCSI] [-StorageClassification <StorageClassification>] -StorageDisk <StorageDisk>
 [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume] [-VMMServer <ServerConnection>]
 [-VirtualHardDiskFormatType <VHDFormatType>] [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] -FileName <String>
 [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] -Path <String> [-ReturnImmediately] [-RunAsynchronously] [-SCSI]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 [-UseLocalVirtualHardDisk] -VM <VM> [-VMMServer <ServerConnection>]
 [-VirtualHardDiskFormatType <VHDFormatType>] [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] -FileName <String> [-Fixed]
 [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-Path <String>] [-ReturnImmediately] [-RunAsynchronously] [-SCSI]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 -VM <VM> [-VMMServer <ServerConnection>] [-VirtualHardDiskFormatType <VHDFormatType>]
 -VirtualHardDiskSizeMB <Int64> [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] -FileName <String> [-Fixed] [-IDE]
 [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-Path <String>] [-ReturnImmediately] [-RunAsynchronously]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 -VM <VM> [-VMMServer <ServerConnection>] [-VirtualHardDiskFormatType <VHDFormatType>]
 -VirtualHardDiskSizeMB <Int64> [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] -FileName <String> [-IDE]
 [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] -Path <String> [-ReturnImmediately] [-RunAsynchronously]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 [-UseLocalVirtualHardDisk] -VM <VM> [-VMMServer <ServerConnection>]
 [-VirtualHardDiskFormatType <VHDFormatType>] [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] -FileName <String> [-Fixed]
 [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-ReturnImmediately] [-RunAsynchronously] [-SCSI]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 [-VMMServer <ServerConnection>] -VMTemplate <Template> [-VirtualHardDiskFormatType <VHDFormatType>]
 -VirtualHardDiskSizeMB <Int64> [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] -FileName <String> [-Fixed] [-IDE]
 [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification>]
 [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume] [-VMMServer <ServerConnection>] -VMTemplate <Template>
 [-VirtualHardDiskFormatType <VHDFormatType>] -VirtualHardDiskSizeMB <Int64> [-VolumeType <VolumeType>]
 [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] -FileName <String> [-Fixed] [-IDE]
 -JobGroup <Guid> [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-Path <String>] [-ReturnImmediately] [-RunAsynchronously]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 [-VMMServer <ServerConnection>] [-VirtualHardDiskFormatType <VHDFormatType>] -VirtualHardDiskSizeMB <Int64>
 [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] -FileName <String>
 -JobGroup <Guid> [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] -Path <String> [-ReturnImmediately] [-RunAsynchronously]
 [-SCSI] [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>]
 [-SystemVolume] [-UseLocalVirtualHardDisk] [-VMMServer <ServerConnection>]
 [-VirtualHardDiskFormatType <VHDFormatType>] [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] -FileName <String> [-IDE]
 -JobGroup <Guid> [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] -Path <String> [-ReturnImmediately] [-RunAsynchronously]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 [-UseLocalVirtualHardDisk] [-VMMServer <ServerConnection>] [-VirtualHardDiskFormatType <VHDFormatType>]
 [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] -FileName <String> [-Fixed]
 -JobGroup <Guid> [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>]
 [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-Path <String>] [-ReturnImmediately] [-RunAsynchronously]
 [-SCSI] [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>]
 [-SystemVolume] [-VMMServer <ServerConnection>] [-VirtualHardDiskFormatType <VHDFormatType>]
 -VirtualHardDiskSizeMB <Int64> [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-IDE] [-JobVariable <String>]
 -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>]
 [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification>]
 [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume] [-VMMServer <ServerConnection>] -VMTemplate <Template>
 -VirtualHardDisk <StandaloneVirtualHardDisk> [-VirtualHardDiskFormatType <VHDFormatType>]
 [-VolumeType <VolumeType>] [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-IDE] [-JobVariable <String>]
 -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>]
 [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification>]
 -StorageDisk <StorageDisk> [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume] -VM <VM>
 [-VMMServer <ServerConnection>] [-VirtualHardDiskFormatType <VHDFormatType>] [-VolumeType <VolumeType>]
 [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-IDE] -JobGroup <Guid>
 [-JobVariable <String>] -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-ReturnImmediately] [-RunAsynchronously] [-StorageClassification <StorageClassification>]
 -StorageDisk <StorageDisk> [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 [-VMMServer <ServerConnection>] [-VirtualHardDiskFormatType <VHDFormatType>] [-VolumeType <VolumeType>]
 [<CommonParameters>]
New-SCVirtualDiskDrive [-BootVolume] -Bus <Byte> [-CreateDiffDisk <Boolean>] [-JobVariable <String>]
 -LUN <Byte> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>]
 [-ReturnImmediately] [-RunAsynchronously] [-SCSI] [-SharedStorage <Boolean>]
 [-StorageClassification <StorageClassification>] [-StorageQoSPolicy <StorageQoSPolicy>] [-SystemVolume]
 [-VMMServer <ServerConnection>] -VMTemplate <Template> -VirtualHardDisk <StandaloneVirtualHardDisk>
 [-VirtualHardDiskFormatType <VHDFormatType>] [-VolumeType <VolumeType>] [<CommonParameters>]

Description

The New-SCVirtualDiskDrive cmdlet creates a virtual disk drive object on a virtual machine deployed on a host managed by Virtual Machine Manager (VMM), or creates a virtual disk drive object on a template in the VMM library.

In System Center 2016, you can create a differencing disk by using the Differencing and ParentVirtualHardDiskPath parameters. A differencing disk is a disk associated in a parent-child relationship to another disk that you want to leave intact. You can change the data or operating system on the child disk without affecting the parent disk. You can revert changes to the child disk. The child disk must have the same virtual hard disk format as the parent disk, either VHD or VHDX. You can set the format by using the VirtualHardDiskFormat parameter.

A virtual hard disk file that is stored on a VMM library share, but is not attached to a virtual disk drive, exists as a stand-alone object in the library. It could be a Windows-based .vhd or .vhdx file or a VMware-based .vmdk file.

A pass-through disk is a disk on a Hyper-V or VMware ESX host that a virtual machine on that host can use instead of using a virtual hard disk. The corresponding VMware term is Raw Device Mapping (RDM). The host disk is either a local hard disk or a logical unit on a Storage Area Network (SAN). VMM lets the virtual machine bypass the host file system and access the pass-through disk directly. Hyper-V hosts support pass-through disks and conversion of a pass-through disk to a VHD. VMware ESX hosts support pass-through disks, but not disk conversion. Citrix XenServer hosts do not support pass-through disks.

You cannot create a checkpoint of a pass-through disk because checkpoint creation is designed to work with virtual hard disks.

Examples

Example 1: Create a virtual disk drive on a template and attach an existing virtual hard disk

PS C:\> $VHD = Get-SCVirtualHardDisk -Name "Blank Disk - Small.vhd"
PS C:\> $VMTemplate = Get-SCVMTemplate | Where-Object {$_.Name -Eq "VMTemplate01"}
PS C:\> New-SCVirtualDiskDrive -VMTemplate $VMTemplate -IDE -Bus 1 -Lun 1 -VirtualHardDisk $VHD

The first command gets the virtual hard disk object named Blank Disk - Small from the VMM library by using the Get-SCVirtualHardDisk cmdlet. The command stores that object in the $VHD variable.

The second command gets the virtual machine template object named VMTemplate01 from the library by using the Get-SCVMTemplate cmdlet. The command stores stores that object in the $Template variable.

The last command creates a virtual disk drive on VMTemplate01. The commandattaches the virtual hard disk stored in $VHD to the second channel in the second slot of the IDE bus on the virtual disk drive.

Example 2: Create a virtual disk drive and add it to an existing virtual machine

PS C:\> $VM = Get-SCVirtualMachine -Name "VM01"
PS C:\> New-SCVirtualDiskDrive -VM $VM -Dynamic -FileName "Test" -IDE -Size 20000 -Bus 0 -LUN 1

The first command gets the virtual machine object named VM01 by using the Get-SCVirtualMachine cmdlet. The command stores that object in the $VM variable.

The second command creates a dynamic virtual disk drive on the first IDE channel in the second slot of the virtual machine. The command specifies its size as 19.5 GB.

Example 3: Create a virtual disk drive from an existing VHD and attach it to a new virtual machine

PS C:\> $JobGroupID = [Guid]::NewGuid().ToString()
PS C:\> $VHD = Get-SCVirtualHardDisk -VMMServer "VMMServer01.Contoso.com" | Where-Object {$_.Location -Eq "\\LibServer01.Contoso.com\MSSCVMMLibrary\VHDs\Blank Disk - Large.vhd"} 
PS C:\> New-SCVirtualDiskDrive -IDE -Bus 0 -LUN 1 -JobGroup $JobGroupID -VirtualHardDisk $VHD 
PS C:\> $HWProfile = Get-SCHardwareProfile | Where-Object {$_.Name -Match "NewHWProfile01"}
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost03"
PS C:\> New-SCVirtualMachine -Name "VM10" -Description "New Virtual Machine VM10" -VMMServer "VMMServer01.Contoso.com" -Owner "Contoso\Katarina" -VMHost $VMHost -Path "D:\VirtualMachinePath" -HardwareProfile $HWProfile -JobGroup $JobGroupID -RunAsynchronously -StartAction NeverAutoTurnOnVM -StopAction SaveVM

The first command generates a GUID, and the stores it as a string in the $JobGroupID variable. The job group ID functions as an identifier that groups subsequent commands that include $JobGroupID into a single job group.

The second command gets the virtual hard disk object from the VMM library location \LibraryServer01.Contoso.com\MSSCVMMLibrary\VHDs\Blank Disk - Large.vhd, and then stores that object in the $VHD variable.

The third command creates a virtual hard disk drive object and assigns the new object to IDE Bus 0 and LUN 1. This command also attaches the virtual hard disk stored in $VHD to the new object. By using the JobGroup parameter, this command runs just before the last command that invokes the job group and associate the new virtual hard disk drive object with the new virtual machine created in the previous command.

The fourth command gets the hardware profile object that contains the string NewHWProfile01 in its name by using the Get-SCHardwareProfile cmdlet. The command stores that object in the $HwProfile variable.

The fifth command gets the host object named VMHost03 by using the Get-SCVMHost cmdlet. The command stores the host object in the $VMHost variable.

The last command creates a virtual machine named VM10 using the hardware settings stored in $HWProfile. The command deploys the virtual machine on VMHost03. The command specifies that the virtual machine is not automatically started when the host starts and is put into a saved state when the virtualization service stops. This command uses the JobGroup parameter to indicate that any previous cmdlets that use the same job group ID is run before creating the virtual machine. In this case, the New-SCVirtualDiskDrive cmdlet from the third command creates a virtual disk drive and associates it with the new virtual machine.

Example 4: Create a virtual disk drive using a host disk and attach it to an existing virtual machine

PS C:\> $VM = Get-SCVirtualMachine -Name "VM04"
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost04.Contoso.com"
PS C:\> $HostDisk = @(Get-SCStorageDisk -VMHost $VMHost | Where-Object {$_.IsPassThroughCapable -Eq $True})
PS C:\> New-SCVirtualDiskDrive -VM $VM -HostDisk $HostDisk[0] -SCSI -Bus 0 -LUN 1

The first command gets the virtual machine object named VM04, and then stores that object in the $VM variable.

The second command gets the host object named VMHost04, and then stores that object in the $VMHost variable.

The third command gets all storage disk objects on VMHost04 that are pass-through capable, and then stores those objects in the $HostDisk variable. Using the @ symbol and parentheses makes sure that the command stores the results in an array, in case the command returns a single object or a $Null value.

The last command creates a virtual disk drive object that is connected to a physical host disk on VMHost04. The virtual disk drive is attached to the second slot of the first SCSI bus on VM04. This example assumes the virtual machine already has a SCSI controller.

Example 5: Create a virtual disk drive from an existing VHDX and attach it to an existing virtual machine

PS C:\> $VHDX = Get-SCVirtualHardDisk -VMMServer "VMMServer01.Contoso.com" | Where-Object {$_.Location -Eq "\\LibServer01.Contoso.com\MSSCVMMLibrary\VHDs\Blank Disk - Large.vhdx"} 
PS C:\> $VM = Get-SCVirtualMachine -Name "VM05"
PS C:\> New-SCVirtualDiskDrive -VM $VM -VirtualHardDisk $VHDX -IDE -Bus 0 -LUN 1

The first command gets the virtual hard disk object named Blank Disk - Large.vhdx from the VMM library, and then stores that object in the $VHDX variable.

The second command gets the virtual machine object named VM05, and then stores that object in the $VM variable.

The last command creates a virtual disk drive from Blank Disk - Large.vhdx and attaches the new virtual disk drive to VM05.

Example 6: Create a differencing disk and attach it to an existing virtual machine

PS C:\> $VM = Get-SCVirtualMachine -Name "VM06"
PS C:\> New-SCVirtualDiskDrive -Bus 1 -LUN 1 -FileName "DiffDisk" -ParentVirtualHardDiskPath "C:\VirtualMachines\ParentDisk01.vhdx" -Differencing -VirtualHardDiskFormat "VHDX" -IDE -VM $VM

The first command gets the virtual machine object named VM06, and that stores that object in the $VM variable.

The second command creates a differencing disk named DiffDisk.vhdx that has the specified parent disk, and attaches the differencing disk to VM06.

Parameters

-AnyStorageDisk

Indicates that this cmdlet uses placeholder parameter that indicates the creation of pass-through disks in a new virtual machine job group.

Type:SwitchParameter
Aliases:AnyHostDisk
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-BootVolume

Indicates that the volume attached to the VirtualDiskDrive is a boot volume.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Bus

Specifies the IDE bus to which to attach a virtual disk drive or the SCSI bus to which to attach a virtual disk drive.

Type:Byte
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CreateDiffDisk

Indicates whether the cmdlet creates a differencing disk.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Differencing

Indicates that the virtual hard disk is created as a differencing disk.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Dynamic

Specifies that a virtual hard disk can expand dynamically.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-FileName

Specifies the file name to use when you rename a virtual hard disk file as you add it to a virtual machine.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Fixed

Indicates that a virtual hard disk is fixed in size.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IDE

Indicates that IDE is the bus type to which to attach a virtual disk drive object configured on a virtual machine or on a template.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobGroup

Specifies an identifier for a series of commands that run as a set just before the final command that includes the same job group identifier runs.

Type:Guid
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

Specifies a variable in which job progress is tracked and stored.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LUN

Specifies the logical unit number (LUN) for a virtual disk drive object or for a virtual disk drive object on a SCSI bus.

Type:Byte
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnBehalfOfUser

Specifies a user name. This cmdlet operates on behalf of the user that this parameter specifies.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnBehalfOfUserRole

Specifies a user role. To obtain a user role, use the Get-SCUserRole cmdlet. This cmdlet operates on behalf of the user role that this parameter specifies.

Type:UserRole
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ParentVirtualHardDiskPath

Specifies the path of the parent virtual hard disk to use to create a differencing disk.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Path

Specifies the destination path for the virtual disk drive.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ReturnImmediately

Indicates that control is returned to the calling process immediately, before the job is created.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SCSI

Specifies SCSI as the bus type to which to attach a virtual disk drive object configured on a virtual machine or on a template.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SharedStorage

Indicates whether the virtual disk drive uses shared storage.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StorageClassification

Specifies a storage classification object.

Type:StorageClassification
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StorageDisk

Specifies a disk on a Hyper-V or VMware ESX host that a virtual machine on that host can use instead of using a virtual hard disk. This disk is referred to as a pass-through disk. The corresponding VMware term is Raw Device Mapping (RDM). The host disk is either a local hard disk or a logical unit on a Storage Area Network (SAN). VMM lets the virtual machine bypass the host's file system and access the pass-through disk directly. Hyper-V hosts support pass-through disks and conversion of a pass-through disk to a VHD. VMware ESX hosts support pass-through disks, but not disk conversion. Citrix XenServer hosts do not support pass-through disks.

Type:StorageDisk
Aliases:HostDisk
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StorageQoSPolicy

Specifies a storage Quality of Service (QoS) policy.

Type:StorageQoSPolicy
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SystemVolume

Indicates that the volume attached to the VirtualDiskDrive is a system volume.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UseLocalVirtualHardDisk

Verifies that the VHD file or files to use to create the virtual machine exist and are stored on the destination host.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VM

Specifies a virtual machine object.

Type:VM
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VMTemplate

Specifies a VMM template object that is used to create virtual machines.

Type:Template
Aliases:Template
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VirtualHardDisk

Specifies a virtual hard disk object.

Type:StandaloneVirtualHardDisk
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VirtualHardDiskFormatType

Specifies the hard disk format type. Valid values are:

- VHD

  • VMDK
  • VHDX

Type:VHDFormatType
Parameter Sets:VHD, VMDK, VHDX, VHDS
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VirtualHardDiskSizeMB

Specifies the size, in megabytes (MB), of a fixed virtual hard disk file or the maximum possible size of a dynamically expanding virtual hard disk file.

Type:Int64
Aliases:Size
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VolumeType

Specifies the volume type for a virtual hard disk. Valid values are: Boot, System, BootAndSystem, and None.

Type:VolumeType
Parameter Sets:None, Boot, System, BootAndSystem
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

VirtualDiskDrive

This cmdlet returns a **VirtualDiskDrive** object.

Notes

* This cmdlet requires a VMM virtual hard disk object, which can be retrieved by using the **Get-SCVirtualHardDisk** cmdlet.