title: Azure VM. Get OS version. Powershell
body: <p>I'm trying to do a powershell script that can list my VM's in Azure, including what OS they are.
  I managed to get a list of my VM's using:</p>
  
  <pre><code>Get-AzureVM
  </code></pre>
  
  <p>But I can't find the OS version.</p>
  
  <p>I also know about asking the WMI: </p>
  
  <pre><code>(Get-WmiObject -class Win32_OperatingSystem).Caption
  </code></pre>
  
  <p>But that's not going to work with the VM's I have in DMZ, as I have no network connection to them from where I'm runing the script.</p>
  
  <p>Ideas?</p>