Hi,
I am trying to create a table in a report in CSV that I can copy and paste to a Word table for a report of what is installed on a machine in terms of roles and features.
I see that without no selection of any property I get a nice indented output like this one:
Get-WindowsFeature | Where-Object {$_. installstate -eq "installed"}
Display Name Name Install State
------------ ---- -------------
[X] Servicios de archivos y almacenamiento FileAndStorage-Services Installed
[X] Servicios de almacenamiento Storage-Services Installed
[X] CaracterĂsticas de .NET Framework 4.6 NET-Framework-45-Fea... Installed
[X] .NET Framework 4.6 NET-Framework-45-Core Installed
[X] Servicios WCF NET-WCF-Services45 Installed
[X] Uso compartido de puertos TCP NET-WCF-TCP-PortShar... Installed
[X] CaracterĂsticas de Windows Defender Windows-Defender-Fea... Installed
[X] Windows Defender Windows-Defender Installed
[X] Compatibilidad con el protocolo para compartir a... FS-SMB1 Installed
[X] Compatibilidad con WoW64 WoW64-Support Installed
[X] Windows PowerShell PowerShellRoot Installed
[X] Windows PowerShell 5.1 PowerShell Installed
If I select the property displayname I lose the and the indentation of the hierarchy. In my report I want to show that hierarchy through the indentation (if possible replacing with tabs).
How can I achieve that?