Documentation

{{docApp.title}}

{{docApp.description}}

How can we help?

{{docApp.searchError}}
{{product.name}}

Searching in {{docApp.searchFilterBySpecificBookTitle}}

{{docApp.searchResultFilteredItems.length}} results for: {{docApp.currentResultsSearchText}} in {{docApp.searchFilterBySpecificBookTitle}}
Search results have been limited. There are a total of {{docApp.searchResponse.totalResultsAvailable}} matches.

You have an odd number of " characters in your search terms - each one needs closing with a matching " character!

{{docApp.libraryHomeViewProduct.title || docApp.libraryHomeViewProduct.id}}

{{docApp.libraryHomeViewProduct.description}}

  1. {{book.title}}

{{group.title || group.id}}

{{group.description}}

  1. {{book.title}}

{{group.title}}

New VHD

Operation Information

This operation will create a new Virtual Hard Disk, then mount, initialize, partition and format it so the drive is ready to use, before adding it to the target VM. See the New-VHD documentation for more information: https://docs.microsoft.com/en-us/powershell/module/hyper-v/new-vhd?view=win10-ps

Input Parameters

Name Type Description Required Sensitive
VMName string The name of the Virtual Machine to perform the action against Yes No
HostName string Optionally provide the Hyper-V host to perform the action on. NetBIOS names, IP addresses, and fully qualified domain names are allowable No No
Path string The path and filename of the new VHD file Yes No
ParentPath string Specifies the path to the parent of the differencing disk to be created (this parameter may be specified only for the creation of a differencing disk) No No
SourceDisk decimal Specifies the physical disk to be used as the source for the virtual hard disk to be created No No
Fixed boolean Specifies that a fixed virtual hard disk is to be created Yes No
SizeBytes string The maximum size of the VHD to be created. Examples: 1.5GB, 10GB, 1TB No No
Differencing boolean Specifies that a differencing virtual hard disk is to be created Yes No
Dynamic boolean Specifies that a dynamic virtual hard disk is to be created Yes No
BlockSizeBytes string Specifies the block size of the virtual hard disk to be created. Examples: 128MB, 64MB No No
LogicalSectorSizeBytes decimal Specifies the logical sector size, in bytes, of the virtual hard disk to be created. Valid values are 512 and 4096 No No
PhysicalSectorSizeBytes decimal Specifies the physical sector size, in bytes, of the virtual hard disk to be created. Valid values are 512 and 4096 No No
FileSystem string Specifies the file system with which to format the volume. One of: NTFS/ReFS/exFAT/FAT32/FAT Yes No
NewFileSystemLabel string Specifies the label to use for the volume No No

Output Parameters

Name Type Description Required Sensitive
outcome string Outcome of the operation. Can be OK, WARN or FAIL Yes No
errors string Any errors returned by the operation No No
warnings string Any warnings returned by the operation No No
Path string Path No No
ObjectId string Object ID No No
UniqueId string Unique ID No No
DriveLetter string Drive Letter No No
FileSystem string File System No No
Size string Size No No
SizeRemaining string Size Remaining No No
OperationalStatus string Operational Status No No
ControllerLocation string Controller Location No No
ControllerNumber string Controller Number No No
ControllerType string Controller Type No No
Name string Name No No
ID string ID No No
In This Document