How can I get commas and keys in an html report?

0

I want to generate an HTML report with the win32_cdromdrive class, I need the CapabilityDescriptions object to display commas and keys. In the powershell if keys, commas and words are shown, but in the html report only words are displayed

the data type of the CapabilityDescriptions object is string

I want the html report to look the same as in the powershell console

html

    
asked by Jose Mae 08.07.2016 в 21:49
source

1 answer

3

Use -join to join the strings with commas and if you want to add brackets to them it's quite simple:

gwmi Win32_CDRomDrive | Select @{l='Cap';e={'{'+($_.CapabilityDescriptions -join ',')+'}'}}, Caption
    
answered by 24.05.2017 в 16:53