VMware Cloud Community
Shoganator
Enthusiast
Enthusiast
Jump to solution

Set-VirtualSwitch does not apply exact number of ports specified

Hi all,

Bit of a funny one this, and I haven't been able to find a concrete answer as to why (communities + google search). When I modify a standard virtual switch with PowerCLI, specifically to modify the number of ports (example from 128 -> 1016), the switch seems to apply 1008, but not 1016. Any ideas as to why I am seeing this behaviour? Here is small bit of script I am using:

$vSwitches = Get-VirtualSwitch | Where {$_.NumPorts -lt "1016"}
foreach ($vSwitch in $vSwitches) {
      Set-VirtualSwitch -VirtualSwitch $vSwitch -NumPorts "1016" -Confirm:$false
      }

Cheers,

Sean

Message was edited by: Shoganator, changed code highlighting to quote.

My personal blog: http://www.shogan.co.uk .::. Twitter: shogan85 .::. if an answer has helped or solved your question, please don't forget to mark as "Answered" or "Helpful"!
Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

I think KB1008040 explains what you are seeing.


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

View solution in original post

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

I think KB1008040 explains what you are seeing.


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

Reply
0 Kudos
Shoganator
Enthusiast
Enthusiast
Jump to solution

Hi Luc,

Thanks - that would be the answer I was looking for. Surprised my search didn't turn that KB article up - I must have been using the wrong terms!

Cheers,

Sean

My personal blog: http://www.shogan.co.uk .::. Twitter: shogan85 .::. if an answer has helped or solved your question, please don't forget to mark as "Answered" or "Helpful"!
Reply
0 Kudos