New-SCVirtualDiskDrive

Creates a virtual disk drive object.

Syntax

New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -VirtualHardDisk <StandaloneVirtualHardDisk>
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VMTemplate <Template>
   [-IDE]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -VirtualHardDisk <StandaloneVirtualHardDisk>
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VM <VM>
   [-SCSI]
   [-FileName <String>]
   [-Path <String>]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -VirtualHardDisk <StandaloneVirtualHardDisk>
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -JobGroup <Guid>
   [-IDE]
   [-FileName <String>]
   [-Path <String>]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -VirtualHardDisk <StandaloneVirtualHardDisk>
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VM <VM>
   [-IDE]
   [-FileName <String>]
   [-Path <String>]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -VirtualHardDisk <StandaloneVirtualHardDisk>
   [-SharedStorage <Boolean>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VMTemplate <Template>
   [-SCSI]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -VirtualHardDisk <StandaloneVirtualHardDisk>
   [-SharedStorage <Boolean>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -JobGroup <Guid>
   [-SCSI]
   [-FileName <String>]
   [-Path <String>]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VM <VM>
   -StorageDisk <StorageDisk>
   [-SCSI]
   [-FileName <String>]
   [-Path <String>]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VM <VM>
   [-SCSI]
   [-Fixed]
   -VirtualHardDiskSizeMB <Int64>
   -FileName <String>
   [-Path <String>]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VM <VM>
   [-IDE]
   -FileName <String>
   -Path <String>
   [-UseLocalVirtualHardDisk]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VM <VM>
   [-SCSI]
   -FileName <String>
   -Path <String>
   [-UseLocalVirtualHardDisk]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VM <VM>
   [-IDE]
   [-Fixed]
   -VirtualHardDiskSizeMB <Int64>
   -FileName <String>
   [-Path <String>]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VM <VM>
   -StorageDisk <StorageDisk>
   [-IDE]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VM <VM>
   [-IDE]
   [-Dynamic]
   -VirtualHardDiskSizeMB <Int64>
   -FileName <String>
   [-Path <String>]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VM <VM>
   [-SCSI]
   [-Dynamic]
   -VirtualHardDiskSizeMB <Int64>
   -FileName <String>
   [-Path <String>]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   [-VM <VM>]
   [-JobGroup <Guid>]
   [-SCSI]
   [-IDE]
   -FileName <String>
   [-Path <String>]
   -ParentVirtualHardDiskPath <String>
   [-Differencing]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VMTemplate <Template>
   [-SCSI]
   [-Dynamic]
   -VirtualHardDiskSizeMB <Int64>
   -FileName <String>
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VMTemplate <Template>
   [-IDE]
   [-Dynamic]
   -VirtualHardDiskSizeMB <Int64>
   -FileName <String>
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VMTemplate <Template>
   [-AnyStorageDisk]
   [-SCSI]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VMTemplate <Template>
   [-AnyStorageDisk]
   [-IDE]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VMTemplate <Template>
   [-IDE]
   [-Fixed]
   -VirtualHardDiskSizeMB <Int64>
   -FileName <String>
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -VMTemplate <Template>
   [-SCSI]
   [-Fixed]
   -VirtualHardDiskSizeMB <Int64>
   -FileName <String>
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -JobGroup <Guid>
   -StorageDisk <StorageDisk>
   [-SCSI]
   [-FileName <String>]
   [-Path <String>]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -JobGroup <Guid>
   -StorageDisk <StorageDisk>
   [-IDE]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -JobGroup <Guid>
   [-SCSI]
   [-Fixed]
   -VirtualHardDiskSizeMB <Int64>
   -FileName <String>
   [-Path <String>]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -JobGroup <Guid>
   [-IDE]
   [-Dynamic]
   -VirtualHardDiskSizeMB <Int64>
   -FileName <String>
   [-Path <String>]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -JobGroup <Guid>
   [-SCSI]
   [-Dynamic]
   -VirtualHardDiskSizeMB <Int64>
   -FileName <String>
   [-Path <String>]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -JobGroup <Guid>
   [-AnyStorageDisk]
   [-SCSI]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -JobGroup <Guid>
   [-IDE]
   [-Fixed]
   -VirtualHardDiskSizeMB <Int64>
   -FileName <String>
   [-Path <String>]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -JobGroup <Guid>
   [-AnyStorageDisk]
   [-IDE]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -JobGroup <Guid>
   [-SCSI]
   -FileName <String>
   -Path <String>
   [-UseLocalVirtualHardDisk]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
New-SCVirtualDiskDrive
   [-VMMServer <ServerConnection>]
   -Bus <Byte>
   -LUN <Byte>
   [-VirtualHardDiskFormatType <VHDFormatType>]
   [-CreateDiffDisk <Boolean>]
   -JobGroup <Guid>
   [-IDE]
   -FileName <String>
   -Path <String>
   [-UseLocalVirtualHardDisk]
   [-BootVolume]
   [-SystemVolume]
   [-VolumeType <VolumeType>]
   [-StorageClassification <StorageClassification>]
   [-StorageQoSPolicy <StorageQoSPolicy>]
   [-ReturnImmediately]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<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 2019, 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
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-BootVolume

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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-CreateDiffDisk

Indicates whether the cmdlet creates a differencing disk.

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

-Differencing

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

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

-Dynamic

Specifies that a virtual hard disk can expand dynamically.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
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
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Fixed

Indicates that a virtual hard disk is fixed in size.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
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
Position:Named
Default value:None
Required:True
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
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-JobVariable

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

Type:String
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:True
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
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Path

Specifies the destination path for the virtual disk drive.

Type:String
Position:Named
Default value:None
Required:True
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
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SharedStorage

Indicates whether the virtual disk drive uses shared storage.

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

-StorageClassification

Specifies a storage classification object.

Type:StorageClassification
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-StorageQoSPolicy

Specifies a storage Quality of Service (QoS) policy.

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

-SystemVolume

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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VirtualHardDisk

Specifies a virtual hard disk object.

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

-VirtualHardDiskFormatType

Specifies the hard disk format type. Valid values are:

  • VHD
  • VMDK
  • VHDX
Type:VHDFormatType
Accepted values:VHD, VMDK, VHDX, VHDS
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VM

Specifies a virtual machine object.

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

-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-VMTemplate

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

Type:Template
Aliases:Template
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-VolumeType

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

Type:VolumeType
Accepted values:None, Boot, System, BootAndSystem
Position:Named
Default value:None
Required:False
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.