I started some of this with PowerCLI 6.x and have recently only used it with PowerCLI 10.x vSphere 6.5 Update 1 (July 2017) is the earliest build I've validated it on lately - Your Mileage May Vary on older builds. Have used it extensively on vSphere 6.7 lately. A VCSA already stood up in...
deploy2node-sample.ps1
This script deploys a vSAN 6.0/6.5/6.7/& 6.7 P01 Witness Appliance. It will: Configure networking Add the vSAN Witness to vCenter Allows either Management (vmk0) or vmk1 to have vSAN Traffic tagged (not both) (v2/v3) Sets static routes (if they are set) and vmk1 is used ...
Vsan-WitnessDeploy.ps1