< Back
Add-AzureVMImage
Post
NAME Add-AzureVMImage
SYNOPSIS
Adds a new operating system image or a new virtual machine image to the image repository.
SYNTAX
Add-AzureVMImage [-ImageName] <String> [-MediaLocation] <String> [[-IconName] <String>] [[-SmallIconName] <String>] [[-ShowInGui]] [-OS] <String>
[[-Label] <String>] [[-Eula] <String>] [[-Description] <String>] [[-ImageFamily] <String>] [[-PublishedDate] <Nullable`1[DateTime]>] [[-PrivacyUri]
<Uri>] [[-RecommendedVMSize] <String>] [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>] [-InformationVariable <String>]
[<CommonParameters>]
Add-AzureVMImage [-ImageName] <String> [-DiskConfig] <VirtualMachineImageDiskConfigSet> [[-IconName] <String>] [[-SmallIconName] <String>]
[[-ShowInGui]] [-OS] <String> [[-Label] <String>] [[-Eula] <String>] [[-Description] <String>] [[-ImageFamily] <String>] [[-PublishedDate]
<Nullable`1[DateTime]>] [[-PrivacyUri] <Uri>] [[-RecommendedVMSize] <String>] [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>]
[-InformationVariable <String>] [<CommonParameters>]
DESCRIPTION
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.
PARAMETERS
-ImageName <String>
Specifies the name of the image being added to the image repository.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-MediaLocation <String>
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.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-OS <String>
Specifies the operating system version of the image.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Label <String>
Specifies a label to give the image.
Required? false
Position? 3
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Eula <String>
Specifies the End User License Agreement. It is recommended that you use an URL for this value.
Required? false
Position? 4
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Description <String>
Specifies the description of the operating system image.
Required? false
Position? 5
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ImageFamily <String>
Specifies a value that is used to group operating system images.
Required? false
Position? 6
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PublishedDate <Nullable`1[DateTime]>
Specifies the date when the operating system image was added to the image repository.
Required? false
Position? 7
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PrivacyUri <Uri>
Specifies the URL that points to a document that contains the privacy policy related to the OS image.
Required? false
Position? 8
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RecommendedVMSize <String>
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
Required? false
Position? 9
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-IconName <String>
Specifies the name of the icon that is used when the image is added to the repository.
Required? false
Position? 10
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-SmallIconName <String>
Specifies the name of the small icon that is used when the image is added to the repository.
Required? false
Position? 11
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ShowInGui [<SwitchParameter>]
Required? false
Position? 12
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Profile <AzureSMProfile>
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationAction <ActionPreference>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationVariable <String>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DiskConfig <VirtualMachineImageDiskConfigSet>
Specifies the operating system disk configuration for the virtual machine image.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByValue, ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
OSImageContext
NOTES
-------------------------- Example 1: Add an operating system image to the repository --------------------------
PS C:\\>$S = New-AzureVMImageDiskConfigSet
PS C:\\> Set-AzureVMImageOSDiskConfig -DiskConfig $S -HostCaching ReadWrite -OSState "Generalized" -OS "Windows" -MediaLink $Link
PS C:\\> Set-AzureVMImageDataDiskConfig -DiskConfig $S -DataDiskName "Test1" -HostCaching ReadWrite -Lun 0 -MediaLink $Link1
PS C:\\> Set-AzureVMImageDataDiskConfig -DiskConfig $S -DataDiskName "Test4" -HostCaching ReadWrite -Lun 0 -MediaLink $Link
PS C:\\> Remove-AzureVMImageDataDiskConfig -DiskConfig $S -DataDiskName "Test4"
PS C:\\> $IMGName = "TestCREATEvmimage2";
PS C:\\> Add-AzureVMImage -ImageName $IMGName -Label "Test1" -Description "Test1" -DiskConfig $S -Eula "http://www.contoso.com" -ImageFamily Windows
-PublishedDate (Get-Date) -PrivacyUri '"http://www.test.com" -RecommendedVMSize Small -IconName "Icon01" -SmallIconName "SmallIcon01" -ShowInGui
This example adds an operating system image to the repository.
RELATED LINKS
Get-AzureVMImage
Remove-AzureVMImage
Save-AzureVMImage
Update-AzureVMImage
SYNOPSIS
Adds a new operating system image or a new virtual machine image to the image repository.
SYNTAX
Add-AzureVMImage [-ImageName] <String> [-MediaLocation] <String> [[-IconName] <String>] [[-SmallIconName] <String>] [[-ShowInGui]] [-OS] <String>
[[-Label] <String>] [[-Eula] <String>] [[-Description] <String>] [[-ImageFamily] <String>] [[-PublishedDate] <Nullable`1[DateTime]>] [[-PrivacyUri]
<Uri>] [[-RecommendedVMSize] <String>] [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>] [-InformationVariable <String>]
[<CommonParameters>]
Add-AzureVMImage [-ImageName] <String> [-DiskConfig] <VirtualMachineImageDiskConfigSet> [[-IconName] <String>] [[-SmallIconName] <String>]
[[-ShowInGui]] [-OS] <String> [[-Label] <String>] [[-Eula] <String>] [[-Description] <String>] [[-ImageFamily] <String>] [[-PublishedDate]
<Nullable`1[DateTime]>] [[-PrivacyUri] <Uri>] [[-RecommendedVMSize] <String>] [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>]
[-InformationVariable <String>] [<CommonParameters>]
DESCRIPTION
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.
PARAMETERS
-ImageName <String>
Specifies the name of the image being added to the image repository.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-MediaLocation <String>
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.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-OS <String>
Specifies the operating system version of the image.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Label <String>
Specifies a label to give the image.
Required? false
Position? 3
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Eula <String>
Specifies the End User License Agreement. It is recommended that you use an URL for this value.
Required? false
Position? 4
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Description <String>
Specifies the description of the operating system image.
Required? false
Position? 5
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ImageFamily <String>
Specifies a value that is used to group operating system images.
Required? false
Position? 6
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PublishedDate <Nullable`1[DateTime]>
Specifies the date when the operating system image was added to the image repository.
Required? false
Position? 7
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PrivacyUri <Uri>
Specifies the URL that points to a document that contains the privacy policy related to the OS image.
Required? false
Position? 8
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RecommendedVMSize <String>
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
Required? false
Position? 9
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-IconName <String>
Specifies the name of the icon that is used when the image is added to the repository.
Required? false
Position? 10
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-SmallIconName <String>
Specifies the name of the small icon that is used when the image is added to the repository.
Required? false
Position? 11
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ShowInGui [<SwitchParameter>]
Required? false
Position? 12
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Profile <AzureSMProfile>
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationAction <ActionPreference>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationVariable <String>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DiskConfig <VirtualMachineImageDiskConfigSet>
Specifies the operating system disk configuration for the virtual machine image.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByValue, ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
OSImageContext
NOTES
-------------------------- Example 1: Add an operating system image to the repository --------------------------
PS C:\\>$S = New-AzureVMImageDiskConfigSet
PS C:\\> Set-AzureVMImageOSDiskConfig -DiskConfig $S -HostCaching ReadWrite -OSState "Generalized" -OS "Windows" -MediaLink $Link
PS C:\\> Set-AzureVMImageDataDiskConfig -DiskConfig $S -DataDiskName "Test1" -HostCaching ReadWrite -Lun 0 -MediaLink $Link1
PS C:\\> Set-AzureVMImageDataDiskConfig -DiskConfig $S -DataDiskName "Test4" -HostCaching ReadWrite -Lun 0 -MediaLink $Link
PS C:\\> Remove-AzureVMImageDataDiskConfig -DiskConfig $S -DataDiskName "Test4"
PS C:\\> $IMGName = "TestCREATEvmimage2";
PS C:\\> Add-AzureVMImage -ImageName $IMGName -Label "Test1" -Description "Test1" -DiskConfig $S -Eula "http://www.contoso.com" -ImageFamily Windows
-PublishedDate (Get-Date) -PrivacyUri '"http://www.test.com" -RecommendedVMSize Small -IconName "Icon01" -SmallIconName "SmallIcon01" -ShowInGui
This example adds an operating system image to the repository.
RELATED LINKS
Get-AzureVMImage
Remove-AzureVMImage
Save-AzureVMImage
Update-AzureVMImage