Objective: Change every pool datastorePaths to 3 news datastores provisioned.
With the following command I can list the actual datastores.
((Get-HVPool) -PoolName POOL).automatedDesktopData.virtualCenterNamesData.datastorePaths)
To accomplish my objective I ran the following command.
Set-HVPool -PoolName POOL -Key 'automatedDesktopData.virtualCenterNamesData.datastorePath' -value DATASTORE01
But I'm getting the following error:
MethodInvocationException: Exception calling "Desktop_Update" with "3" argument(s): "ExceptionType : VMware.Hv.InvalidArgument ErrorMessage : Cannot update read-only member. ParameterName : automatedDesktopData.virtualCenterNamesData.datastorePath
This Key is not read only, as stated in https://developer.vmware.com/apis/1093/view
Shouldn't the key be automatedDesktopData.virtualCenterNamesData.datastorePaths
See also Mass-change Horizon Linked-Clone datastores (VMwar... - VMware Technology Network VMTN
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes the key is `datastorepaths` I mistyped here (I'm using remmina with WSL, to access the remote server, so no Copy / Past).
And I already checked the post you mentioned above and they are exactly as the VMware API explorer says.
Looking again at the API, the parent property virtualCenterNamesData seems to be read-only.
Which would explain the error.
But I currently have no clue which properties to use to change the datastores.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hey Lucd, I found the following: https://developer.vmware.com/apis/1093/view
automatedDesktopData.virtualCenterProvisioningSettings.virtualCenterStorageSettings.datastores
There are 3 properties inside this key (Datastore, SdrsCluster and StorageOvercommit).
Using the Datastore property, I can see a ID for 3 datastores.
Well, now came the road block, how can I change (Remove, Add, Substitute) theses values?