I am using the following command to get VMNetworkAdapter details:
Get-VMNetworkAdapter -ManagementOS
This provides output in the following format:
Name IsManagementOs VMName SwitchName
I just want the switch name. Do we have any option or flag?
edit: I found the new command to just get switch details
Get-VMSwitch
But this command also returns many fields, I want just the name of the switch.
只需要选择字段
Get-VMNetworkAdapter -ManagementOS|Select -ExpandProperty SwitchName
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.