VMware: NSX: Using PowerCLI/PowerNSX to view distributed firewall (DFW) rules in a table format.

Out-GridView Example
Summary:
This was kind of a fun exercise and helpful considering the NSX plugin kinda blows, in flash client at least.  Have yet to take a look at HTML5 one that was just released.  Was asked if we could output currently configured DFW rules.  Below you will find what I slapped together.  If it's useful to you too, great.  Also, please feel free give me feedback.

It will basically give you the following:
  1. Rule Number 
    • This is kind of a guess in that it assumes that rules will pull down from API in the correct order at runtime.
  2. Rule ID
  3. Rule Name
  4. Source
  5. Destination
  6. Service Ports
  7. Action
  8. appliedTo
This script requires the following powershell modules:
  1. vmware.powercli
  2. powernsx
Script:


Comments

Popular posts from this blog

NSX-T: Release associated invalid node ID from certificate

Azure VMware Solution: NSX-T Active/Active T0 Edges...but

NSX-T: vCenter and NSX-T Inventory out of Sync (Hosts in vSphere not showing up in NSX-T)