I have a datastore that needs to be mounted by all ESXi hosts in a 5.5 cluster. How can I do this with powerCLI?
THanks!
You mean something like this?
$datastoreName = 'DS1'
Get-Cluster | Get-VMHost | %{
if(Get-Datastore -Name $datastoreName -RelatedObject $_){
Write-Host "$($datastoreName) available on $($_.Name)"
}
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You mean something like this?
$datastoreName = 'DS1'
Get-Cluster | Get-VMHost | %{
if(Get-Datastore -Name $datastoreName -RelatedObject $_){
Write-Host "$($datastoreName) available on $($_.Name)"
}
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
OK thanks again!