VMWare doesn’t have an option to migrate or copy a Content Library to a new one. I’ve seen other work arounds that involve subscribing and copying files, etc. But I wanted something a bit more straightforward.
I was surprised when I couldn’t find a script online that involved exporting the content from an existing library and then importing into a new one. There were some scripts that did the import, but not export.
Instead of spending a lot of manually downloading everything, I created a script that will export ISOs and OVFs from an existing Content Library. It puts them on a designated local directory and when complete, it uploads them to your new Content Library. Simple enough.
Anyways, I created a GitHub repo and put the script out there.
You can find it here: Migrate VMWare vSphere Content Library
Update: I found that you will want to specify the -ItemType in lowercase (‘ovf’ or ‘iso’). It will upload and show up in the main CL view if you use uppercase… but will not show up when attempting to use them browsing from a host or VM.