Hello guys,
I need help to create a powercli script that checks if a specific Datastore is availiable and if not rescan´s the HBA.
Thanks
Is this what you want to do ?
$tgtDatastoreName = "DS1" $esxName = "MyESX" if(!(Get-Datastore -Name $tgtDatastoreName -VMHost $esxName -ErrorAction SilentlyContinue)){ Get-VMHostStorage -VMHost $esxName -RescanAllHba}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference