New-CMVhd

Creates a VHD image.

Syntax

New-CMVhd
   [-Confirm]
   [-Description <String>]
   [-DisableWildcardHandling]
   -DistributionPointServerName <String[]>
   [-ForceWildcardHandling]
   -Name <String>
   -TaskSequencePackageId <String>
   [-Timeout <TimeSpan>]
   [-Version <String>]
   -VhdFilePath <String>
   [-VhdSizeGB <Int32>]
   [-WhatIf]
   [<CommonParameters>]

Description

The New-CMVhd cmdlet creates a virtual hard disk (VHD) image by using the operating system deployment feature.

Examples

Example 1: Create a VHD image

PS C:\> New-CMVhd -Name "Windows 10 Enterprise " -Path "\\vhd-server\hyper-v\ Windows10.vhd" -VHDSize 50 -TaskSequencePackageId "P0071267" -DistributionPointServerNames "distribution-server.contoso.com" -Version "X64"

This command creates a virtual hard disk (VHD) image named Windows 10 Enterprise, and then copies the VHD image file to the distribution point that is named distribution-server.contoso.com.

Required Parameters

-DistributionPointServerName
Type:String[]
Aliases:DistributionPointServerNames
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of a VHD image.

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

Specifies an ID for a task sequence package.

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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies a description for the VHD.

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

Indicates that wildcard handling is disabled.

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

Indicates that wildcard handling is enabled.

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

Specifies a version for the VHD. Use any string.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VhdSizeGB
Type:Int32
Aliases:VhdSize
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False