Set-CMVhd

Modifies VHD images.

Syntax

Set-CMVhd
   [-Confirm]
   [-Description <String>]
   [-DisableWildcardHandling]
   -DistributionPointServerName <String[]>
   [-ForceWildcardHandling]
   -InputObject <IResultObject>
   [-NewName <String>]
   [-TaskSequencePackageId <String>]
   [-Timeout <TimeSpan>]
   [-Version <String>]
   [-VhdFilePath <String>]
   [-WhatIf]
   [<CommonParameters>]
Set-CMVhd [-Confirm] [-Description ] [-DisableWildcardHandling] -DistributionPointServerName 
 [-ForceWildcardHandling] -Name  [-NewName ] [-TaskSequencePackageId ]
 [-Timeout ] [-Version ] [-VhdFilePath ] [-WhatIf] []
Set-CMVhd [-Confirm] [-Description ] [-DisableWildcardHandling] -DistributionPointServerName 
 [-ForceWildcardHandling] [-NewName ] [-TaskSequencePackageId ] [-Timeout ]
 [-Version ] [-VhdFilePath ] -VhdPackageId  [-WhatIf] []

Description

The Set-CMVhd cmdlet modifies one or more virtual hard disk (VHD) images that were created through the operating system deployment feature.

Examples

Example 1: Change the distribution point server for a VHD

PS C:\> Set-CMVhd -Name "Windows 10 Enterprise" -DistributionPointServerNames "distribution-server.contoso.com"

This command changes the distribution point server for the virtual hard disk (VHD) named Windows 10 Enterprise.

Example 2: Rename a VHD

PS C:\> Set-CMVhd -Name "Windows 10 Enterprise"-NewName "User Desktop Image"

This command renames the VHD named Windows 10 Enterprise. In this example, the VHD is renamed to User Desktop Image.

Required Parameters

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

Specifies a VHD image. To obtain a VHD image, use the Get-CMVhd cmdlet.

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

Specifies an array of names of VHD images.

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

Specifies a new name for the VHD image.

Type:String
Required:False
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: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
-VhdFilePath
Type:String
Aliases:PackageSourcePath, Path
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