I have a subscriber CL that automatically syncs from the publisher every 4 hours or so. I’m trying to do a manual sync sooner than scheduled (within a script).
Through the vCenter UI, I can right click on the subscriber Content Library and tell it to synchronize. This causes an immediate sync; however, if I try via powercli, I get the error message from Set-ContentLibrary: “Subscribed content library <myContentLibrary> is automatically synchronized and it can't be synchronized manually.”
# Sync the subscribed repoWrite-Host "Syncing subscriber repo"$CLrepo_sub = Get-ContentLibrary -Name $Content_Library_sub_name -SubscribedSet-ContentLibrary -SubscribedContentLibrary $CLrepo_sub -Sync
How can I force the subscriber to sync with the publisher?
(see example 2 on https://developer.broadcom.com/powercli/latest/vmware.vimautomation.core/commands/set-contentlibrary)
As an alternative you could try the underlying REST API directly, see content library: update
That seems to be a bug in the cmdlet.I suggest opening an SR