Skip to content

Instantly share code, notes, and snippets.

@chrisbrownie
Last active December 7, 2017 02:28
Show Gist options
  • Save chrisbrownie/ab6ba3868618900cf4bbc46d960c5fee to your computer and use it in GitHub Desktop.
Save chrisbrownie/ab6ba3868618900cf4bbc46d960c5fee to your computer and use it in GitHub Desktop.
Returns a list of each sku and the service plans associated. For creating LicenseOption objects with New-MsolLicenseOptions
foreach ($sku in (Get-MsolAccountSku) ) {
foreach ($sp in $sku.ServiceStatus) {
New-Object -TypeName PSObject -Property @{"AccountSkuId"=$sku.AccountSkuId;"ServicePlan"=$sp.ServicePlan.ServiceName}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment