Forum Discussion

Azhar_pasha's avatar
Azhar_pasha
Copper Contributor
Mar 10, 2021

Please help me to Get the list of user license status with real product name rather then cryptic SKU

Hello All,

 

I have a script to get the list of user license status its giving me "cryptic SKU", Please help me to get the real product names instead of cryptic SKU ID strings like “SPE_E3” (which stands for “Microsoft 365 E3”). powershell script. To import and export with license status.

Many thanks in advance.

My script:

 

$UserCredential = Get-Credential
Connect-MsolService -Credential $UserCredential

 

Get-content C:\Users\Admin\Desktop\conver.csv | foreach {Get-MsolUser -UserPrincipalName $_ | Where-Object {($_.licenses).AccountSkuId }} | Select-Object UserPrincipalname,islicensed, {$_.Licenses.AccountSkuId}| Export-csv C:\Users\Admin\Downloads\Licensestatus.csv

Resources