Skip to content

Commit 60f567a

Browse files
authored
Update cli-ps-findimage.md
1 parent b26afd3 commit 60f567a

File tree

1 file changed

+48
-1
lines changed

1 file changed

+48
-1
lines changed

articles/virtual-machines/windows/cli-ps-findimage.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,56 @@ These values can be passed individually or as an image *URN*, combining the valu
3232

3333
If the image publisher provides additional license and purchase terms, then you must accept those before you can use the image. For more information, see [Accept purchase plan terms](#accept-purchase-plan-terms).
3434

35+
## Default Images
36+
37+
Powershell offers several pre-defined image aliases to make the resource creation process easier. There are different images for resources with either a Windows or Linux operating system. Several Powershell cmdlets, such as `New-AzVM` and `New-AzVmss`, allow you to input the alias name as a parameter.
38+
For example:
39+
40+
```powershell
41+
$rgname = <Resource Group Name>
42+
$location = <Azure Region>
43+
$vmName = "v" + $rgname
44+
$domainNameLabel = "d" + $rgname
45+
$securePassword = <Password> | ConvertTo-SecureString -AsPlainText -Force
46+
$username = <Username>
47+
$credential = New-Object System.Management.Automation.PSCredential ($username, $securePassword)
48+
New-AzVM -ResourceGroupName $rgname -Location $location -Name $vmName -Image CentOS85Gen2 -Credential $credential -DomainNameLabel $domainNameLabel
49+
```
50+
51+
The Linux image alias names and their details are:
52+
```output
53+
Alias Architecture Offer Publisher Sku Urn Version
54+
----------------------- -------------- ---------------------------- ---------------------- ---------------------------------- ------------------------------------------------------------------------------ ---------
55+
CentOS x64 CentOS OpenLogic 7.5 OpenLogic:CentOS:7.5:latest latest
56+
CentOS85Gen2 x64 CentOS OpenLogic 8_5-gen2 OpenLogic:CentOS:8_5-gen2:latest latest
57+
Debian11 x64 Debian-11 Debian 11-backports-gen2 Debian:debian-11:11-backports-gen2:latest latest
58+
Debian10 x64 Debian-10 Debian 10 Debian:debian-10:10:latest latest
59+
FlatcarLinuxFreeGen2 x64 flatcar-container-linux-free kinvolk stable kinvolk:flatcar-container-linux-free:stable:latest latest
60+
openSUSE-Leap x64 opensuse-leap-15-3 SUSE gen2 SUSE:opensuse-leap-15-3:gen2:latest latest
61+
OpenSuseLeap154Gen2 x64 opensuse-leap-15-4 SUSE gen2 SUSE:opensuse-leap-15-4:gen2:latest latest
62+
RHEL x64 RHEL RedHat 7-LVM RedHat:RHEL:7-LVM:latest latest
63+
RHELRaw8LVMGen2 x64 RHEL RedHat 8-lvm-gen2 RedHat:RHEL:8-lvm-gen2:latest latest
64+
SLES x64 sles-15-sp3 SUSE gen2 SUSE:sles-15-sp3:gen2:latest latest
65+
UbuntuLTS x64 UbuntuServer Canonical 16.04-LTS Canonical:UbuntuServer:16.04-LTS:latest latest
66+
Ubuntu2204 x64 0001-com-ubuntu-server-jammy Canonical 22_04-lts-gen2 Canonical:UbuntuServer:22_04-lts-gen2:latest latest
67+
```
68+
69+
The Windows image alias names and their details are:
70+
```output
71+
Alias Architecture Offer Publisher Sku Urn Version
72+
----------------------- -------------- ---------------------------- ---------------------- ---------------------------------- ------------------------------------------------------------------------------ ---------
73+
Win2022Datacenter x64 WindowsServer MicrosoftWindowsServer 2022-Datacenter MicrosoftWindowsServer:WindowsServer:2022-Datacenter:latest latest
74+
Win2022AzureEditionCore x64 WindowsServer MicrosoftWindowsServer 2022-datacenter-azure-edition-core MicrosoftWindowsServer:WindowsServer:2022-datacenter-azure-edition-core:latest latest
75+
Win10 x64 Windows MicrosoftVisualStudio Windows-10-N-x64 MicrosoftVisualStudio:Windows:Windows-10-N-x64:latest latest
76+
Win2019Datacenter x64 WindowsServer MicrosoftWindowsServer 2019-Datacenter MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest latest
77+
Win2016Datacenter x64 WindowsServer MicrosoftWindowsServer 2016-Datacenter MicrosoftWindowsServer:WindowsServer:2016-Datacenter:latest latest
78+
Win2012R2Datacenter x64 WindowsServer MicrosoftWindowsServer 2012-R2-Datacenter MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter:latest latest
79+
Win2012Datacenter x64 WindowsServer MicrosoftWindowsServer 2012-Datacenter MicrosoftWindowsServer:WindowsServer:2012-Datacenter:latest latest
80+
```
81+
3582
## List images
3683

37-
You can use PowerShell to narrow down a list of images. Replace the values of the variables to meet your needs.
84+
You can use PowerShell to narrow down a list of images if you want to use a specific image that is not provided above. Replace the values of the below variables to meet your needs.
3885

3986
1. List the image publishers using [Get-AzVMImagePublisher](/powershell/module/az.compute/get-azvmimagepublisher).
4087

0 commit comments

Comments
 (0)