How to capture output parameter

54353454535453
How can I get the parameters from Name column in variable (array)?

GeorgyTrubetskoy,
Welcome to the forum. :wave:t3:

Please do not post images of code or console ouput. Instead psot the plain text and format it as code.

When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.

Thanks in advance

How to format code in PowerShell.org 1 <---- Click :point_up_2:t4: :wink:

( !! Sometimes the preformatted text button hides behind the settings gear symbol. :wink: )

Have you at least tried to search for an answer before you came here to ask for help? This is one of the most basic questions when learning PowerShell or scripting or programming in general.

You assign the output to a variable :man_shrugging:t3:

$VMSwitchList = Get-VMSwitch

Now you can output the variable as it is or access the individual properties with the so called dot notation:

$VMSwitchList.Name
1 Like