Skip to main content


Showing posts from June, 2016

Powercli New-Datastore script to mount NFS datastores

One of the pain points of building out a ESXi host is usually when you are presenting your NFS storage to an ESXi host. A few datastore is a easy task but when you have to present 10+ for each of your host it can be a pain. At this point you either have host profiles to help you or you start using powercli to help automate the task. I will talk through how I will be using the command "new-datastore" cmdlet. The easier way to just add one datastore is to run to command: new-datastore -nfs -Name Datastore_Name -Path /vol/abc -nfshost IP_Of_NFS_Server Name - the name that you want to use to help identify the datastore in ESXi host Path - the export path from your NFS server Nfshost - ip address of your nfs server Example new-datastore -nfs -Name nfsdatastore -path /vol/nfsdatastore -nfshost So you could write a command for each new datastore you wish to add to a host in to a powershell script as shown below: new-datastore -nfs -Name nfsdatastore0