VI Toolkit powershell simple script #2 – Create new NFS datastore
This simple little useful script can be used to add a new nfs datastore to all the hosts in an esx cluster. Alternatively you can modify this and replace get-cluster CLUSTER_NAME with get-datacenter DATACENTER_NAME and add an ISO nfs share to your whole datacenter.
foreach ($ESXhost in get-cluster CLUSTER_NAME| get-vmhost)
{
New-datastore –nfs –vmhost $ESXhost –name [datastore_name] –path [/remote_path] –nfshost [nfs_server]
}








































