Last active
August 29, 2015 14:04
-
-
Save lrivallain/ddbca9b4ce214ed073b4 to your computer and use it in GitHub Desktop.
Add a new datastore to a set of ESXi based on cluster membership
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-PSSnapin VMware.VimAutomation.Core | |
$vcenter='127.0.0.1' | |
$cluster='A_cluster_name' | |
$datastorename='A_datastore_name' | |
$nfshost='10.0.0.1' | |
$nfspath='/vol/a_vol_name/a_qtree' | |
Connect-VIServer $vcenter | |
Get-Cluster -Name $cluster | Get-VMHost | New-Datastore -Nfs -Name $datastorename -Path $nfspath -NfsHost $nfshost |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment