I'm looking for powerCLI commands to get / set default storage policy for a vSan Datastore, as we can do it in the web UI, through the Configure tab on a datastore object ?
See page 51 of the POWERCLI COOKBOOK FOR VMWARE VSAN
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
See page 51 of the POWERCLI COOKBOOK FOR VMWARE VSAN
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks LucD, I've upgraded my version of PowerCLI, the commands now accept datastore parameter :
# get default policy of datastore $Datastore
Get-SpbmEntityConfiguration $Datastore
# get new policy by Name
$RAID5Policy = Get-SpbmStoragePolicy -Name “RAID5”
# set as new default policy for datastore $Datastore
Get-SpbmEntityConfiguration $Datastore | Set-SpbmEntityConfiguration -StoragePolicy $RAID5Policy