I can't seem to limit this $userLicenses (without actually explicitly setting it)
What am I missing?
$userLicenses = $userLicense | ? {$usersku -eq 'contoso:ENTERPRISEPACK'}
Open in new window
$UserLicenses yields all the user's licence SKUs, instead of the one.
Here's an example if you were working with objects returned from the Get-MsolAccountSku cmdlet:
Open in new window