Set-AzureRmVMPlan
Sets the Marketplace plan information on a virtual machine.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Set-AzureRmVMPlan
[-VM] <PSVirtualMachine>
[-Name] <String>
[[-Product] <String>]
[[-PromotionCode] <String>]
[[-Publisher] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Set-AzureRmVMPlan cmdlet sets the Azure Marketplace plan information for a virtual machine. Before being able to deploy a Marketplace image through the command-line, programmatic access must be enabled or the virtual machine must be deployed by using the Azure portal.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies the name of the image from the Marketplace. This is the same value that is returned by the Get-AzureRmVMImageSku cmdlet. For more information about how to find image information, see Find and use Azure Marketplace VM images with Azure PowerShell in the Microsoft Azure documentation.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Product
Specifies the product of the image from the Marketplace. This is the same information as the Offer value of the imageReference element.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PromotionCode
Specifies a promotion code.
Type: | String |
Position: | 3 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Publisher
Specifies the publisher of the image. You can find this information by using the Get-AzureRmVMImagePublisher cmdlet.
Type: | String |
Position: | 4 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VM
Specifies the virtual machine object for which to set a Marketplace plan. You can use the Get-AzureRmVM cmdlet to obtain a virtual machine object. You can use the New-AzureRmVMConfig cmdlet to create a virtual machine object.
Type: | PSVirtualMachine |
Aliases: | VMProfile |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |