MrBeanzy MrBeanzy - 3 months ago 15
PowerShell Question

Powershell Create a New Windows 10 VM

When creating a new style VM in azure via powershell i always use this to specify the image

Set-AzureRmVMSourceImage -VM $VirtualMachine -PublisherName MicrosoftWindowsServer -Offer WindowsServer -Skus 2012-R2-Datacenter -Version "latest"


I have been looking through the publishers/offers but i cant seem to find Windows 10?

Am i looking under the wring publisher? I was looking under all the Windows ones

Answer

Presuming you are using an MSDN subscription, otherwise you don't have access to Win10. You can run these commands to get the image

Get-AzureRmVMImagePublisher                                                                                                                                                              
Get-AzureRmVMImageOffer -Location westeurope -PublisherName MicrosoftVisualStudio                                                                                                        
Get-AzureRmVMImageSku -Location westeurope -PublisherName MicrosoftVisualStudio -Offer windows   

The final command will give you a list of Win10 images (for westeurope), the intermediate commands will help you to find other images along the way (the imageoffer cmdlet also has Win10 with Visual Studio preinstalled) They're useful to be able to navigate around quickly.

Comments