Create NSX-T Segments using powerCLI Script

Before running the script you’ll need the following:

  1. Install PowerCLI “Install-Module -Name VMware.PowerCLI -Scope CurrentUser”
  2. NSX Manager FQDNs and credentials
  3. NSX-T Overlay transport zone (the transport zone you will use to use to create the segments) you will need the ID for this
  4. The segments you want to add from TXT or CSV file (Download example from github link below)

Script file can be accessed here along with an example txt file:

PhilCDW/NSXTCreateSegments (github.com)

The Script will ask the following:

Input your NSX-T FQDN:
Credentials for NST-T
Input your Transport Zone ID:

This is one way of finding out the ID of the transport zone, this script also has an example hashed out to pull this from powercli

Leave a Reply

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