Add-AzureVMImage
Syntax
Add-AzureVMImage
[-ImageName] <String>
[-DiskConfig] <VirtualMachineImageDiskConfigSet>
[[-IconName] <String>]
[[-SmallIconName] <String>]
[-ShowInGui]
[[-OS] <String>]
[[-Label] <String>]
[[-Eula] <String>]
[[-Description] <String>]
[[-ImageFamily] <String>]
[[-PublishedDate] <DateTime>]
[[-PrivacyUri] <Uri>]
[[-RecommendedVMSize] <String>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Add-AzureVMImage
[-ImageName] <String>
[-MediaLocation] <String>
[[-IconName] <String>]
[[-SmallIconName] <String>]
[-ShowInGui]
[-OS] <String>
[[-Label] <String>]
[[-Eula] <String>]
[[-Description] <String>]
[[-ImageFamily] <String>]
[[-PublishedDate] <DateTime>]
[[-PrivacyUri] <Uri>]
[[-RecommendedVMSize] <String>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[-Profile <AzureSMProfile>]
[<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.
Examples
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.
Required Parameters
Specifies the operating system disk configuration for the virtual machine image.
| Type: | VirtualMachineImageDiskConfigSet |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName, ByValue) |
| Accept wildcard characters: | False |
Specifies the name of the image being added to the image repository.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
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.
| Type: | String |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Specifies the operating system version of the image.
| Type: | String |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Optional Parameters
Specifies the description of the operating system image.
| Type: | String |
| Position: | 5 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Specifies the End User License Agreement. It is recommended that you use an URL for this value.
| Type: | String |
| Position: | 4 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Specifies the name of the icon that is used when the image is added to the repository.
| Type: | String |
| Aliases: | IconUri |
| Position: | 10 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Specifies a value that is used to group operating system images.
| Type: | String |
| Position: | 6 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
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 |
Specifies an information variable.
| Type: | String |
| Aliases: | iv |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies a label to give the image.
| Type: | String |
| Position: | 3 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Specifies the URL that points to a document that contains the privacy policy related to the operating system image.
| Type: | Uri |
| Position: | 8 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
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 |
Specifies the date when the operating system image was added to the image repository.
| Type: | DateTime |
| Position: | 7 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
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
| Type: | String |
| Position: | 9 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Indicates that this cmdlet shows the image in the GUI.
| Type: | SwitchParameter |
| Position: | 12 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Specifies the name of the small icon that is used when the image is added to the repository.
| Type: | String |
| Aliases: | SmallIconUri |
| Position: | 11 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Outputs
OSImageContext