Forum Discussion
mfranhind115
Jul 14, 2022Brass Contributor
Powershell: get data from MsOnline
Hi all, I would extract some "basic" data like "UserPrincipalName, DisplayName, licenses, islicensed, creation date, last activation date" and others "nested" like AlternateEmailAddresses. If po...
- Jul 15, 2022Nice, expanding on my ugly script 😛
Jul 14, 2022
You could change
$Licenses = [PSCustomObject]@{
User = $User.UserPrincipalName
LicenseSKU = $SKUfriendlyname.Product_Display_Name
Serviceplan = $serviceplan.Service_Plans_Included_Friendly_Names
}
$UsersLicenses += $Licenses
to
$Licenses = [PSCustomObject]@{
User = $User.UserPrincipalName
DisplayName = $User.DisplayName
LicenseSKU = $SKUfriendlyname.Product_Display_Name
Serviceplan = $serviceplan.Service_Plans_Included_Friendly_Names
}
$UsersLicenses += $Licenses
I added DisplayName as example, you can add rows to it from these values
mfranhind115
Jul 14, 2022Brass Contributor
thank you Harm!
but I meant if we can put the infos of the user in the same row, not splitted in several rows...
thanks
but I meant if we can put the infos of the user in the same row, not splitted in several rows...
thanks