Adds a new operating system image or a new virtual machine image to the image repository.
Note
The cmdlets referenced in this documentation are for managing legacy Azure resources that use
Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating
new resources since ASM is scheduled for retirement. For more information, see
Azure Service Manager retirement.
The Az PowerShell module is the recommended
PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.
The Add-AzureVMImage cmdlet adds a new operating system image or a new virtual machine image to the image repository.
The image is a generalized operating system image, using either Sysprep for Windows or, for Linux, using the appropriate tool for the distribution.
Examples
Example 1: Add an operating system image to the repository
This example adds an operating system image to the repository.
Parameters
-Description
Specifies the description of the operating system image.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
5
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-DiskConfig
Specifies the operating system disk configuration for the virtual machine image.
Parameter properties
Type:
VirtualMachineImageDiskConfigSet
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
VMImage
Position:
1
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Eula
Specifies the End User License Agreement.
It is recommended that you use an URL for this value.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
4
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-IconName
Specifies the name of the icon that is used when the image is added to the repository.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
IconUri
Parameter sets
(All)
Position:
10
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-ImageFamily
Specifies a value that is used to group operating system images.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
6
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-ImageName
Specifies the name of the image being added to the image repository.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
0
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-InformationAction
Specifies how this cmdlet responds to an information event.
The acceptable values for this parameter are:
Continue
Ignore
Inquire
SilentlyContinue
Stop
Suspend
Parameter properties
Type:
ActionPreference
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
infa
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InformationVariable
Specifies an information variable.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
iv
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Label
Specifies a label to give the image.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
3
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-MediaLocation
Specifies the location of the physical blob page where the image resides.
This is a link to a blob page in the current subscription's storage.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
OSImage
Position:
1
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-OS
Specifies the operating system version of the image.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
OSImage
Position:
2
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-PrivacyUri
Specifies the URL that points to a document that contains the privacy policy related to the operating system image.
Parameter properties
Type:
Uri
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
8
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
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.
Parameter properties
Type:
AzureSMProfile
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PublishedDate
Specifies the date when the operating system image was added to the image repository.
Parameter properties
Type:
DateTime
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
7
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-RecommendedVMSize
Specifies the size to use for the virtual machine that is created from the operating system image.
The acceptable values for this parameter are:
Medium
Large
ExtraLarge
A5
A6
A7
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
9
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-ShowInGui
Indicates that this cmdlet shows the image in the GUI.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
12
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-SmallIconName
Specifies the name of the small icon that is used when the image is added to the repository.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
SmallIconUri
Parameter sets
(All)
Position:
11
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.