List all Server Features/Roles in Powershell

Question:

So I have the following code to output all features and roles installed:

However, the output is:

How can I get rid of the @ and {}‘s ?

Answer:

Use Select -ExpandProperty Name instead of Select -Property Name

Alternatively and also, I recommend using Foreach-Object instead of a C-style for loop.

Or

Source:

List all Server Features/Roles in Powershell by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply