O'Reilly logo

Mastering PowerCLI by Sajal Debnath

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring Netflow

To configure Netflow, we need to access APIs. To do this, we will access the ReconfigureDVPortgroup_Task method. Alan Renouf has a very good blog and description for this (http://www.virtu-al.net/2013/07/23/disabling-netflow-with-powercli/):

PS C:\> (Get-VDPortgroup -Name TestPortGroup).Extensiondata.Config.defaultPortConfig.ipfixEnabled.Value
False

Next, we will change the value. As seen in the following output, it takes a VMware.Vim.DVPortgroupConfigSpec type specification:

PS C:\> (Get-VDPortgroup -Name "TestPortGroup") Extensiondata.ReconfigureDVPortgroup_Task

OverloadDefinitions                                                                                   
-------------------                                                                                   
VMware.Vim.ManagedObjectReference ReconfigureDVPortgroup_Task(VMware.Vim.DVPortgroupConfigSpec spec)

To do this, we will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required