VMware Cloud Community
dee0606
Enthusiast
Enthusiast

Capture free port in Port group

Tring to monitor the free ports via powercli and set the alert mechanism.

dee0606_1-1638181996963.png

If anyone has an idea share it? to avoid last-minute failure as mention in the KB https://kb.vmware.com/s/article/1038193

Labels (3)
0 Kudos
1 Reply
LucD
Leadership
Leadership

Try something like this

Get-VDPortgroup |
Select -Property Name,@{N='VDSwitch';E={$_.VDswitch.Name}},NumPorts,
  @{N='Used';E={(Get-VDPort -VDPortgroup $_ | where{$_.ConnectedEntity}).Count}},
  @{N='Free';E={$_.NumPorts - (Get-VDPort -VDPortgroup $_ | where{$_.ConnectedEntity}).Count}}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos