Hello, I use this script to get some network adapter information, I would like to get also switch too,
Get-VMHostNetworkAdapter |
Where-Object {$_.GetType().Name -eq "PhysicalNicImpl"} |
Select-Object -Property VMHost,Name,BitRatePerSec,FullDuplex,Mac,DhcpEnabled,
@{Name="AutoNegotiate";Expression={
if ($_.ExtensionData.Spec.LinkSpeed)
{$false} else {$true}
}},
@{Name="LinkState";Expression={
if ($_.ExtensionData.LinkSpeed)
{"Up"} else {"Down"}
}} | Export-Csv -Path C:\Users\gemela\info.csv -NoTypeInformation -UseCulture
Thanks