Get VMHost Swap datastore using PowerCLI

By | March 23, 2020

This is a quick one-liner to get the configured swap datastore on a host/hosts:

If we want to make the name look a little nicer we could do:

This would get the results for all the esxi hosts for the target that you are connected to, however if you wanted to reduce the scope to a cluster or a datacenter you could change the start to:

Or you could pipe in the location or array of hosts:

or: