That post was only published 4 hours ago
But luckily you can access the API methods from PowerCLI.
Try something like this (note that the folder should exist).$esxName = 'MyEsx'
$dsName = 'MyDS'
$dsFolder = 'ToolsRepo'
$esx = Get-VMHost -Name $esxName
$ds = Get-Datastore -Name $dsName
$oldLocation = $esx.ExtensionData.QueryProductLockerLocation()
$location = "/$($ds.ExtensionData.Info.Url.TrimStart('ds:/'))$dsFolder"
Write-Host "Tools repository moved from"
I know it only 4 hours only. but you know the question is going to come up, because what do you do when you have lots and lots of host to change, Powercli it!!!
thanks for the answer LucD.
That's the spirit, automate it (with PowerCLI preferably) when you do it more than once
should we be updating
UpdateProductLockerLocation or UpdateProductLockerLocation_task?
Both API methods do the same.
The ones with _Task at the end run in async mode, similar to the RunAsync switch on some PowerCLI cmdlets.
The post applies to vSphere 6.7U1.
If we are in a mixed environment, VC on 6.7U1, but ESXi still on 6.5 (upgrade planned), may I use this method?
Since the method is called on the ESXi node, I'm afraid your ESXi needs to be on 6.7U1.