This script includes a function that reports the vSAN Witness information for a 2 Node or Stretched vSAN Cluster. Information included is:
Cluster Name Witness Host Name Witness Uuid Witness IP Address Which Fault Domain is currently Preferred From the RVC:
From PowerCLI