Update-​Azure​VM​Image

Updates the label of an operating system image in the image repository.

Syntax

Update-AzureVMImage
      [-ImageName] <String>
      [-Label] <String>
      [[-IconName] <String>]
      [[-SmallIconName] <String>]
      [-DontShowInGui]
      [[-Eula] <String>]
      [[-Description] <String>]
      [[-ImageFamily] <String>]
      [[-PublishedDate] <DateTime>]
      [[-PrivacyUri] <Uri>]
      [[-RecommendedVMSize] <String>]
      [[-DiskConfig] <VirtualMachineImageDiskConfigSet>]
      [[-Language] <String>]
      [-InformationAction <ActionPreference>]
      [-InformationVariable <String>]
      [-Profile <AzureSMProfile>]
      [<CommonParameters>]

Description

The Update-AzureVMImage cmdlet updates the label on an operating system image in the image repository. It returns an image object with information about the updated image.

Examples

Example 1: Update an image by changing the image label

PS C:\> Update-AzureVMImage -ImageName "Windows-Server-2008-SP2" -Label "DoNotUse"

This command updates the image named Windows-Server-2008-SP2 by changing the image label to DoNotUse.

Example 2: Get all operating systems by label and then update the label

PS C:\> Get-AzureVMImage | Where-Object {$_.Label -eq "DoNotUse" } | Update-AzureVMImage -Label "Updated"

This command gets all the operating system images labeled DoNotUse and changes the label to Updated.

Required Parameters

-ImageName

Specifies the name of the image to update in the image repository.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Label

Specifies the new label of the image.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Description

Specifies the description of the operating system image.

Type:String
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-DiskConfig

Specifies the operating system disk and data disk configuration for the virtual machine image created by using the New-AzureVMImageDiskConfigSet, Set-AzureVMImageOSDiskConfig, and Set-AzureVMImageDataDiskConfig cmdlets.

Type:VirtualMachineImageDiskConfigSet
Position:8
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-DontShowInGui

Indicates that this cmdlet does not show the image in the GUI.

Type:SwitchParameter
Position:12
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Eula

Specifies the End User License Agreement. We recommend that the value is a URL.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-IconName

Specifies the standard icon name for the operating system or virtual machine image.

Type:String
Aliases:IconUri
Position:10
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ImageFamily

Specifies a value that can be used to group operating system or virtual machine images.

Type:String
Position:4
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-InformationAction

Specifies how this cmdlet responds to an information event.

The acceptable values for this parameter are:

  • Continue
  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Language

Specifies the language for the operating system in the virtual machine or operating system image.

Type:String
Position:9
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PrivacyUri

Specifies the URI that points to a document that contains the privacy policy related to the operating system image.

Type:Uri
Position:6
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Type:AzureSMProfile
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PublishedDate

Specifies the date when the operating system image was added to the image repository.

Type:DateTime
Position:5
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-RecommendedVMSize

Specifies the size of the virtual machine.

The acceptable values for this parameter are:

  • Medium
  • Large
  • ExtraLarge
  • A5
  • A6
  • A7
Type:String
Position:7
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SmallIconName

Specifies the small icon name for the operating system or virtual machine image.

Type:String
Aliases:SmallIconUri
Position:11
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Outputs

OSImageContext