Set-CMVhd
Set-CMVhd
Modifies VHD images.
Syntax
Parameter Set: SetById
Set-CMVhd -PackageID <String[]> [-Description <String> ] [-DistributionPointServerNames <String[]> ] [-NewName <String> ] [-Path <String> ] [-SecurityScopeAction <SecurityScopeActionType> {AddMembership | RemoveMembership} ] [-SecurityScopeName <String> ] [-TaskSequencePackageId <String> ] [-Version <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetByName
Set-CMVhd -Name <String[]> [-Description <String> ] [-DistributionPointServerNames <String[]> ] [-NewName <String> ] [-Path <String> ] [-SecurityScopeAction <SecurityScopeActionType> {AddMembership | RemoveMembership} ] [-SecurityScopeName <String> ] [-TaskSequencePackageId <String> ] [-Version <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetByValue
Set-CMVhd -InputObject <IResultObject> [-Description <String> ] [-DistributionPointServerNames <String[]> ] [-NewName <String> ] [-Path <String> ] [-SecurityScopeAction <SecurityScopeActionType> {AddMembership | RemoveMembership} ] [-SecurityScopeName <String> ] [-TaskSequencePackageId <String> ] [-Version <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetSecurityScopeById
Set-CMVhd -SecuredScopeNames <String[]> [-Description <String> ] [-DistributionPointServerNames <String[]> ] [-NewName <String> ] [-PackageID <String[]> ] [-Path <String> ] [-SecurityScopeAction <SecurityScopeActionType> {AddMembership | RemoveMembership} ] [-SecurityScopeName <String> ] [-TaskSequencePackageId <String> ] [-Version <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetSecurityScopeByName
Set-CMVhd -SecuredScopeNames <String[]> [-Description <String> ] [-DistributionPointServerNames <String[]> ] [-Name <String[]> ] [-NewName <String> ] [-Path <String> ] [-SecurityScopeAction <SecurityScopeActionType> {AddMembership | RemoveMembership} ] [-SecurityScopeName <String> ] [-TaskSequencePackageId <String> ] [-Version <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Set-CMVhd cmdlet modifies one or more virtual hard disk (VHD) images that were created through the operating system deployment feature.
Parameters
-Description<String>
Specifies a description for the VHD.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-DistributionPointServerNames<String[]>
Specifies an array of names of distribution point servers, which contain content that the task sequence requires.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-InputObject<IResultObject>
Specifies a VHD image. To obtain a VHD image, use the Get-CMVhd cmdlet.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue, ByPropertyName) |
Accept Wildcard Characters? |
false |
-Name<String[]>
Specifies an array of names of VHD images.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-NewName<String>
Specifies a new name for the VHD image.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-PackageID<String[]>
Specifies an array of IDs of packages.
Aliases |
Id |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Path<String>
Specifies a path for the VHD image.
Aliases |
PackageSourcePath |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-SecuredScopeNames<String[]>
Specifies an array of names of secured scopes. A secured scope name can be Default or the name of a custom-created secured scope.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-SecurityScopeAction<SecurityScopeActionType>
Specifies an action for a security scope. Valid values are: AddMembership and RemoveMembership.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-SecurityScopeName<String>
Specifies the name of a security scope. A security scope name can be Default or the name of a custom security scope.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-TaskSequencePackageId<String>
Specifies an ID for a task sequence package.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Version<String>
Specifies a version for the VHD. Use any string.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Change the distribution point server for a VHD
This command changes the distribution point server for the virtual hard disk (VHD) named Windows 10 Enterprise.
PS C:\> Set-CMVhd -Name "Windows 10 Enterprise" -DistributionPointServerNames "distribution-server.contoso.com"
Example 2: Rename a VHD
This command renames the VHD named Windows 10 Enterprise. In this example, the VHD is renamed to User Desktop Image.
PS C:\> Set-CMVhd -Name "Windows 10 Enterprise"-NewName "User Desktop Image"