Skip to content

Commit cb956d3

Browse files
committed
trying adding code type
1 parent 5407f52 commit cb956d3

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

articles/virtual-machines/deprecated-images.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ sections:
9090
9191
List VM with deprecated image at Plan/SKU level.
9292
93-
```
93+
```azurecli
9494
az vm show --resource-group $rgName --name $vmName --query "storageProfile.imageReference.exactVersion
9595
az vm list --query "[?storageProfile.imageReference.sku=='2016-Datacenter'].{VM:id, imageOffer:storageProfile.imageReference.offer, imagePublisher:StorageProfile.imageReference.publisher, imageSku: storageProfile.imageReference.sku, imageVersion:storageProfile.imageReference.version}"
9696
```
9797
9898
List VM with deprecated image at version level.
9999
100-
```
100+
```azurecli
101101
az vm list --query "[?storageProfile.imageReference.version=='14393.4402.2105052108'].{VM:id, imageOffer:storageProfile.imageReference.offer, imagePublisher:StorageProfile.imageReference.publisher, imageSku: storageProfile.imageReference.sku, imageVersion:storageProfile.imageReference.version}"
102102
```
103103
@@ -106,20 +106,20 @@ sections:
106106
107107
List VM with deprecated images at version level.
108108
109-
```
109+
```powershell
110110
(Get-AzVM -ResourceGroupName $rgname -Name $vmname).StorageProfile.ImageReference.ExactVersion
111111
```
112112
113113
To find scale set using a deprecated version.
114114
115-
```
115+
```powershell
116116
$vmsslist = Get-AzVmss
117117
$vmsslist | where {$_.virtualMachineProfile.storageProfile.imageReference.Version -eq '14393.4402.2105052108'} | Select-Object -Property ResourceGroupName, Name, @{label='imageOffer'; expression={$_.virtualMachineProfile.storageProfile.imageReference.Offer}}, @{label='imagePublisher'; expression={$_.virtualMachineProfile.storageProfile.imageReference.Publisher}}, @{label='imageSKU'; expression={$_.virtualMachineProfile.storageProfile.imageReference.Sku}}, @{label='imageVersion'; expression={$_.virtualMachineProfile.storageProfile.imageReference.Version}}
118118
```
119119
120120
List scale sets with deprecated images at plan/SKU level.
121121
122-
```
122+
```powershell
123123
$vmsslist = Get-AzVmss
124124
$vmsslist | where {$_.virtualMachineProfile.storageProfile.imageReference.Sku -eq '2016-Datacenter'} | Select-Object -Property ResourceGroupName, Name, @{label='imageOffer'; expression={$_.virtualMachineProfile.storageProfile.imageReference.Offer}}, @{label='imagePublisher'; expression={$_.virtualMachineProfile.storageProfile.imageReference.Publisher}}, @{label='imageSKU'; expression={$_.virtualMachineProfile.storageProfile.imageReference.Sku}}, @{label='imageVersion'; expression={$_.virtualMachineProfile.storageProfile.imageReference.Version}}
125125
```
@@ -143,14 +143,14 @@ sections:
143143
144144
Using the Azure CLI:
145145
146-
```
146+
```azurecli
147147
az vm image list --location "west europe" --publisher "MicrosoftWindowsServer"
148148
```
149149
150150
151151
Using PowerShell:
152152
153-
```
153+
```powershell
154154
Get-AzVMImage -Location "west europe" -PublisherName “MicrosoftWindowsServer”
155155
```
156156
@@ -162,13 +162,13 @@ sections:
162162
163163
Azure CLI:
164164
165-
```
165+
azurecli
166166
az vm image list --location "west europe" --publisher "MicrosoftWindowsServer" --offer "WindowsServer"
167167
```
168168
169169
PowerShell:
170170
171-
```
171+
```powershell
172172
Get-AzVMImage -Location "west europe" -PublisherName “MicrosoftWindowsServer” -Offer “WindowsServer”
173173
```
174174
@@ -180,13 +180,13 @@ sections:
180180
181181
Azure CLI:
182182
183-
```
183+
```azurecli
184184
az vm image list --location "west europe" --publisher "MicrosoftWindowsServer" --offer "WindowsServer" --sku "2019-Datacenter-with-Containers" --all"
185185
```
186186
187187
PowerShell:
188188
189-
```
189+
```powershell
190190
Get-AzVMImage -Location "west europe" -PublisherName “MicrosoftWindowsServer” -Offer “WindowsServer” -Skus "2019-Datacenter-with-Containers"
191191
```
192192
@@ -222,7 +222,7 @@ sections:
222222
223223
The response indicates that this is deprecated:
224224
225-
```
225+
```json
226226
{
227227
"error": {
228228
"code": "ImageVersionDeprecated",

0 commit comments

Comments
 (0)