This script uses an input CSV (example: datasource-bulk-import.csv) to add multiple vRealize Network Insight Data Sources. Modify datasource-bulk-import.csv to contain your own data sources (vCenters, NSX, switches, firewalls) and run this script with the param -DatasourcesCSV to your CSV.
It requires the PowervRNI module to be installed, as it uses it to connect to the Network Insight API.
More info on PowervRNI, here: https://github.com/PowervRNI/powervrni