Forum Discussion
Powershell: get data from MsOnline
- Jul 15, 2022Nice, expanding on my ugly script 😛
? Could you show a screenshot? Did it install the module if not present and did it prompt for Global Admin credentials? (Should show a modern authentication logon screen)
#Create table
not from the beginning
it isnt right?
- Jul 14, 2022No, that's good.. You have to be connected, that's all.. I just ran it on my machine, still works like it should... Weird
- mfranhind115Jul 14, 2022Brass Contributor
it works!!!!
great thanks!
any chances to get infos of a user on the same row?now it gets me lot of rows for every user
- Jul 14, 2022
You could change
$Licenses = [PSCustomObject]@{
User = $User.UserPrincipalName
LicenseSKU = $SKUfriendlyname.Product_Display_Name
Serviceplan = $serviceplan.Service_Plans_Included_Friendly_Names
}
$UsersLicenses += $Licensesto
$Licenses = [PSCustomObject]@{
User = $User.UserPrincipalName
DisplayName = $User.DisplayName
LicenseSKU = $SKUfriendlyname.Product_Display_Name
Serviceplan = $serviceplan.Service_Plans_Included_Friendly_Names
}
$UsersLicenses += $LicensesI added DisplayName as example, you can add rows to it from these values
- mfranhind115Jul 14, 2022Brass Contributorthank you Harm!
but I meant if we can put the infos of the user in the same row, not splitted in several rows...
thanks