Made a small script (with help from interweb) to add NFS datastore to all ESXhosts in cluster.
foreach
($ESXhost in get-cluster <CLUSTER>| get-vmhost
{
New-datastore ?nfs ?vmhost $ESXhost ?name <DATASTORENAME> ?path /<PATH> ?nfshost <NFSHOST>
}
#change <CLUSTER> to your clustername
#change <DATASTORENAME>, <PATH> and <NFSHOST> to desired settings.
NFSHOST can be ip-address or simply hostname
On a side note:
Anyone capable of adding some functionallity to the script?
I got 2 datacenters, with 3 clusters all together.
What I would like is an addon/fix - where I can do this with one script and three different settings for the individual clusters.