VMware Cloud Community
agough
Enthusiast
Enthusiast

Update vSphere content library in PowerCLI

I'm trying to update an item in a vSphere content library using powershell, think i've found the appropriate API i need to use to achieve this (com.vmware.content.library.item.update_session), but i'm a bit lost now as to how to take my VM and push the update to the library.

Background: I've got a View Horizon script that checks all snaps in use on desktop pools, compares the snap in use create date to the library item create date, then returns a warning if the library item is older. What I want to do is trigger an update job if the library is older than the in use snapshot, so i can use the published library to keep our DR site upto date. Presently i just report status and give a warning if the snapshot is older than the library item, then prompt to update via the webUI, but it would be great to automate end to end

0 Kudos
0 Replies