Skip to content

Instantly share code, notes, and snippets.

@thisboyiscrazy
Last active April 22, 2016 19:38
Show Gist options
  • Save thisboyiscrazy/f438a8457710ebbe26bf50ab2783dafb to your computer and use it in GitHub Desktop.
Save thisboyiscrazy/f438a8457710ebbe26bf50ab2783dafb to your computer and use it in GitHub Desktop.
$users = Get-MsolUser -All | ?{ $_.isLicensed -eq "TRUE" }
$sku = "tenent:SMB_BUSINESS_PREMIUM"
$users | ?{ ($_.Licenses | ?{ $_.AccountSkuId -eq $sku}).Length -gt 0}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment