Pages: [1]
Print
Author Topic: find port configuration for each virtualswitch  (Read 260 times)
esarakaitis
Administrator
Full Member
*****
Posts: 241


8223109 sack57@hotmail.com littleking57 rootinfortwayne
View Profile WWW Email
« on: May 20, 2009, 01:14:36 PM »

Code:
foreach ($vmhost in get-vmhost)
        {
        $switchinfo = get-virtualswitch $vmhost
        foreach ($vmswitch in $switchinfo) {
                "" | select-object (
                           @{Name = "Name"; Expression = {$vmhost.name}},
                           @{Name = "Vswitch"; Expression = {$vmswitch.name}},
                           @{Name = "NumPorts"; Expression = {$vmswitch.numports}},
                           @{Name = "NumPortsAvailable"; Expression = {$vmswitch.NumPortsAvailable}}
        )                   
        }
        }
Logged
Pages: [1]
Print
Jump to: