Power(Shell,CLI,NSX)

Add multiple static routes to all your NSX-v edges

When you have NSX running on a vSAN stretched cluster over two datacenters, or a Cross vCenter NSX setup over multiple datacenters you probably need static routes for the networks behind the DLR to keep the routing tables alive on the physical network routers when a datacenter failover occurs. I am working at a customer where I needed to add 10 static routes to 20 different ESG’s. It’s obvious that I didn’t want to add them manually. Therefore I created a script to put in the static routes in the edges for me. This may come in handy for somebody else.

Requirements:
– Powershell (5.1)
– PowerCLI
– PowerNSX

(more…)

NSX-v backup retention script

The NSX-v manager is not being backed up via snapshot-based backups. This isn’t officially supported. Therefore a file/configuration based backup method used to backup the configuration of your NSX manager periodically.

Unfortunately, there is no retention setting available in the NSX manager so if you are not careful the backup directory will grow in a rapid fashion and fill up your disk very fast. Via this easy script I’ve written, you can enable backup retention for your NSX-v backup files. (more…)

Automate NSX with Powershell without using the PowerNSX module

Currently, I’m working on a migration project where we are migrating VMs from a non-NSX legacy environment to a brand new NSX-enabled infrastructure. During the migration, I needed to apply NSX Security Tags in the destination environment. The tags needed to be applied based on the environment type e.g. Production and Development. And  I thought; Yeah! PowerNSX is going to make my life more easier now.

(more…)

NTP Compliancy: disable NTP sync with host completely (PowerCLI)

Last week I was identifying a root cause for a P1 outage my customer had suffered from. This customer has a business-critical application running 24/7 which is very important for all activities within the company. They had suffered an outage for at least three times last month, and therefore they requested my employer ITQ to perform a health check including a root cause analysis for the latest P1 incidents.

(more…)

NSX-V: Create Logical Switches, Distributed Firewall Sections and Rules based on existing portgroup/vlans

In my previous blog post I wrote about how to automate the Enable MAC learning function on a VMware NSX Logical Switch via Powershell/PowerNSX. In this post I referred to a script which I used to export the configuration of the portgroup/vlans that where currently existing in the environment. I’m writing this blogpost, to share the script because someone might have a use case for it (more…)