Forum Discussion
gautameu
Dec 08, 2020Copper Contributor
Request for assistance - PowerShell Output
I am using Graph API to get some informations in tabular format and current output looks like this:
In first table under "licenseName" column, I am translating "License name" to "FriendlyName" using "replace"
@{Label='LicenseName';Expression={$($_.skuPartNumber -replace $_.skuPartNumber,$sku.Item($_.skuPartNumber))}}
where $sku is like :
$Sku = @{
"DEVELOPERPACK_E5" = "Developer Pack E5 - from MSDN";
"O365_BUSINESS_ESSENTIALS" = "Office 365 Business Essentials";
"O365_BUSINESS_PREMIUM" = "Office 365 Business Premium";
"DESKLESSPACK" = "Office 365 (Plan K1)";
"DESKLESSWOFFPACK" = "Office 365 (Plan K2)";
"LITEPACK" = "Office 365 (Plan P1)";
"EXCHANGESTANDARD" = "Office 365 Exchange Online Only";
"STANDARDPACK" = "Enterprise Plan E1";
"STANDARDWOFFPACK" = "Office 365 (Plan E2)";
"ENTERPRISEPACK" = "Enterprise Plan E3";
"ENTERPRISEPACKLRG" = "Enterprise Plan E3";
"ENTERPRISEWITHSCAL" = "Enterprise Plan E4";
}
However, in other table below, column name "Licenses", I cannot translate it to "FriendlyName" as it has multiple value. I tried several things but no luck (using "replace" like above)
Can anyone please help me.
I thank you in advance
No RepliesBe the first to reply