Replies: 1 comment 3 replies
-
|
Looks great, Thanks. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The idea was to get the exact same result as running
Get-MSolAccountSku, let me know what you think.Connect-Graph "Directory.Read.All","Directory.ReadWrite.All","Organization.Read.All","Organization.ReadWrite.All"$mgSubscribedSkus=Get-MgSubscribedSku$LicensesReport = New-Object System.Collections.ArrayListforeach($mgSubscribedSku in $mgSubscribedSkus){$sku = New-Object PSObject$sku | Add-Member -MemberType NoteProperty -Name SkuPartNumber -Value $mgSubscribedSku.SkuPartNumber$sku | Add-Member -MemberType NoteProperty -Name ActiveUnits -Value $mgSubscribedSku.PrepaidUnits.Enabled$sku | Add-Member -MemberType NoteProperty -Name WarningUnits -Value $mgSubscribedSku.PrepaidUnits.Warning$sku | Add-Member -MemberType NoteProperty -Name ConsumedUnits -Value $mgSubscribedSku.ConsumedUnits$LicensesReport.Add($sku)}$LicensesReportBeta Was this translation helpful? Give feedback.
All reactions