Advertisement
Merzavets

Add new datastore on vmhosts

Jan 23rd, 2014
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $luns = Get-ScsiLun -vmhost esx0 | where {$_.canonicalname -like 'naa*' } # getting iSCSI LUNs ready to add
  2.  
  3. 0..$luns.Count | foreach { New-Datastore -VMHost esx0 -Name "DSname$_" -Vmfs -FileSystemVersion 5 -path $luns[$_].CanonicalName } # creating $luns.Count datastores with name DSname##
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement