VMware Cloud Community
VicMware
Contributor
Contributor

disable management traffic

Hi

Whats the command to disable management traffic on the VMK portgroup?

PowerCLI D:\test> get-vmhost abc | get-VMHostNetworkAdapter where { $_.PortGroupName -eq "1234-abc-VMKernel" } | Set-VMHostNetworkAdapter -managementtrafficenabled $false

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership

Try like this

Get-VMHost abc | Get-VMHostNetworkAdapter | where { $_.PortGroupName -eq "1234-abc-VMKernel" } | 
Set-VMHostNetworkAdapter -ManagementTrafficEnabled:$false


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

Reply
0 Kudos
VicMware
Contributor
Contributor


Hi

It doesnt work

Here is the error

Get-VMHostNetworkAdapter : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.

Get-VMHostNetworkAdapter : 2/05/2014 3:28:02 PM    Get-VMHostNetworkAdapter        VMHostNetworkAdapter with name ' $_.PortGroupName -eq "1234-abc-VMKernel" ' was not found using the specified filter(s).

Reply
0 Kudos
LucD
Leadership
Leadership

It looks as you are missing the pipeline symbol (vertical bar) after the Get-VMHostNetworkAdapter cmdlet.

Perhaps attach a screenshot of the command you execute and the error message ?


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

Reply
0 Kudos