title: Get msoluser by a certain license
body: <p>I am trying to get users in office 365 by get-msoluser by a certain license. For some reason I cannot get it to work in the sense that The $user is returning nothing. I am also posistive that it is the correct license as well. Any ideas on what going wrong.</p>
  
  <pre><code>$c = Get-Credential
  Connect-MsolService -Credential $c
  $accountsku = Get-MsolAccountSku
  $userMSOL = Get-MsolUser -All | Where {$_.Licenses.AccountSku -eq $accountsku[0].AccountSkuId}
  </code></pre>