Hi,
Have a Storage array that doesn't do well with multiple concurrent storage vmotions.
Would like to run SDRS recommendation one at a time as to not overload it.
Found plenty of code to apply all the recommendations (like below from ) but my powershell is not strong enough to figure out how to have it execute synchronously
If anyone could help I'd be very grateful
$dscName = 'MyDSC'
$dsc = Get-View -ViewType StoragePod -Filter @{'Name'=$dscName}
$si = Get-View ServiceInstance
$storMgr = Get-View -Id $si.Content.StorageResourceManager
$storMgr.RefreshStorageDrsRecommendation($dsc.MoRef)
$dsc.UpdateViewData()
if($dsc.PodStorageDrsEntry.Recommendation){
$dsc.PodStorageDrsEntry.Recommendation | %{
$storMgr.ApplyStorageDrsRecommendationToPod_Task($dsc.MoRef,$_.Key)
}
}