< Back

Get-AzureVMImage

Wed Jan 30, 2019 5:46 pm

NAME Get-AzureVMImage



SYNOPSIS

Gets the properties on one or a list of operating systems or a virtual machine image in the image repository.





SYNTAX

Get-AzureVMImage [[-ImageName] <String>] [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>] [-InformationVariable <String>]

[<CommonParameters>]





DESCRIPTION

The Get-AzureVMImage cmdlet gets properties on one or a list of operating systems or a virtual machine image in the image repository. The cmdlet returns

information for all images in the repository, or about a specific image if its image name is provided.





PARAMETERS

-ImageName <String>

Specifies the name of the operating system or virtual machine image in the image repository. If you do not specify this parameter, all the images

are returned.



Required? false

Position? 0

Default value None

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



<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



NOTES









-------------------------- Example 1: Get a specific image object from the current image repository. --------------------------



PS C:\\>Get-AzureVMImage -ImageName Image001



This command gets the image object named Image001 from the current image repository.

-------------------------- Example 2: Get all images from the current image repository --------------------------



PS C:\\>Get-AzureVMImage



This command retrieves all the images from the current image repository.

-------------------------- Example 3: Set the subscription context and then get all the images --------------------------



PS C:\\>$SubsId = <MySubscriptionID>

C:\\PS>$Cert = Get-AzureCertificate cert:\\LocalMachine\\MY\\<CertificateThumbprint>

C:\\PS>$MyOSImages = Get-AzureVMImage



This command sets the subscription context and then retrieves all the images from the image repository.



RELATED LINKS

Add-AzureVMImage

Remove-AzureVMImage

Save-AzureVMImage

Update-AzureVMImage