Skip to content

Instantly share code, notes, and snippets.

@mattmcnabb
Last active August 22, 2016 01:53
Show Gist options
  • Save mattmcnabb/78775a6f3bd7ec1e9fb3d294c5b9974f to your computer and use it in GitHub Desktop.
Save mattmcnabb/78775a6f3bd7ec1e9fb3d294c5b9974f to your computer and use it in GitHub Desktop.
Blog_Office-365-Licensing_3
$User = Get-MsolUser -UserPrincipalName ronald.reagan@whitehouse.gov
$User.Licenses |
Select-Object -Property AccountSkuId,
@{
n='ServicePlans'
e={ ($_.ServiceStatus | Where-Object ProvisioningStatus -eq 'success').ServicePlan.ServiceName }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment