|
23 | 23 | }
|
24 | 24 | $publishers = Get-AzVMImagePublisher -Location $azLocation.Location
|
25 | 25 |
|
| 26 | + # For each publisher, get latest image AND REQUEST THAT SPECIFIC IMAGE to be able to see the Hyper-V generation. Marvelous. |
26 | 27 | $publishers |
|
27 | 28 | Where-Object PublisherName -eq 'MicrosoftWindowsServer' |
|
28 | 29 | Get-AzVMImageOffer |
|
29 | 30 | Get-AzVMImageSku |
|
30 | 31 | Get-AzVMImage |
|
31 | 32 | Group-Object -Property Skus, Offer |
|
32 |
| - ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 } |
| 33 | + ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 | Get-AzVmImage } |
33 | 34 |
|
34 | 35 | # Linux
|
35 | 36 | # Ubuntu - official
|
|
41 | 42 | Where-Object Skus -notmatch 'arm64' |
|
42 | 43 | Get-AzVMImage |
|
43 | 44 | Group-Object -Property Skus, Offer |
|
44 |
| - ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 } |
| 45 | + ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 | Get-AzVmImage } |
45 | 46 | # RedHat - official
|
46 | 47 | $publishers |
|
47 | 48 | Where-Object PublisherName -eq 'RedHat' |
|
|
51 | 52 | Where-Object Skus -notmatch '(RAW|LVM|CI)' |
|
52 | 53 | Get-AzVMImage |
|
53 | 54 | Group-Object -Property Skus, Offer |
|
54 |
| - ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 } |
| 55 | + ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 | Get-AzVmImage } |
55 | 56 | # CentOS - Roguewave, sounds slightly suspicious
|
56 | 57 | $publishers |
|
57 | 58 | Where-Object PublisherName -eq 'OpenLogic' |
|
|
60 | 61 | Get-AzVMImageSku |
|
61 | 62 | Get-AzVMImage |
|
62 | 63 | Group-Object -Property Skus, Offer |
|
63 |
| - ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 } |
| 64 | + ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 | Get-AzVmImage } |
64 | 65 | # Kali
|
65 | 66 | $publishers |
|
66 | 67 | Where-Object PublisherName -eq 'Kali-Linux' |
|
67 | 68 | Get-AzVMImageOffer |
|
68 | 69 | Get-AzVMImageSku |
|
69 | 70 | Get-AzVMImage |
|
70 | 71 | Group-Object -Property Skus, Offer |
|
71 |
| - ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 } |
| 72 | + ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 | Get-AzVmImage } |
72 | 73 |
|
73 | 74 | # Desktop
|
74 | 75 | $publishers |
|
|
77 | 78 | Get-AzVMImageSku |
|
78 | 79 | Get-AzVMImage |
|
79 | 80 | Group-Object -Property Skus, Offer |
|
80 |
| - ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 } |
| 81 | + ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 | Get-AzVmImage } |
81 | 82 |
|
82 | 83 | # SQL
|
83 | 84 | $publishers |
|
|
87 | 88 | Get-AzVMImage |
|
88 | 89 | Where-Object Skus -in 'Standard','Enterprise' |
|
89 | 90 | Group-Object -Property Skus, Offer |
|
90 |
| - ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 } |
| 91 | + ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 | Get-AzVmImage } |
91 | 92 |
|
92 | 93 | # VisualStudio
|
93 | 94 | $publishers |
|
|
97 | 98 | Get-AzVMImage |
|
98 | 99 | Where-Object Offer -eq 'VisualStudio' |
|
99 | 100 | Group-Object -Property Skus, Offer |
|
100 |
| - ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 } |
| 101 | + ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 | Get-AzVmImage } |
101 | 102 |
|
102 | 103 | # Client OS
|
103 | 104 | $publishers |
|
|
107 | 108 | Get-AzVMImage |
|
108 | 109 | Where-Object Offer -eq 'Windows' |
|
109 | 110 | Group-Object -Property Skus, Offer |
|
110 |
| - ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 } |
| 111 | + ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 | Get-AzVmImage } |
111 | 112 |
|
112 | 113 | # Sharepoint 2013 and 2016
|
113 | 114 | $publishers |
|
|
117 | 118 | Get-AzVMImage |
|
118 | 119 | Where-Object Offer -eq 'MicrosoftSharePointServer' |
|
119 | 120 | Group-Object -Property Skus, Offer |
|
120 |
| - ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 } |
| 121 | + ForEach-Object { $_.Group | Sort-Object -Property PublishedDate -Descending | Select-Object -First 1 | Get-AzVmImage } |
121 | 122 | }
|
0 commit comments