PowerShell: Automating NSX-V Firewall Filter to Export Version 1000

For the migration of NSX-v to NSX-T there is a “small” step which requires to set the ExportVersion set to 1000 (for all VMs on all vSphere hosts), as per this doc.

You can circumvent this step by quickly re-enabling the firewall on the clusters: but this is like shooting a misquito with a shotgun (#overkill), because it has an resource- and security impact on the complete environment.

This script will set the exportversion of each individual VM, by logging in to each host using SSH.
There is no need to enter the root-credentials of the ESXi host, a temporary user is being created which executes the tasks and is being removed afterwards.

You can find the script here.

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top