What’s New for Content Library Management

Welcome to the new year from the PowerCLI team! The first blog of the year is to look at some of the improvements to the way we manage one of the hidden gems of vSphere, Content Library. Little known fact, Content Library was one of the very first services in vCenter which was offered through a REST API as part of the vSphere 6.0 release! Since then, there’s been numerous updates and improvements to the Content Library. These updates have been discussed in the following blog by my teammate Nigel Hickey: The Evolution of Content Library

Late last year, we released PowerCLI 11.5. This new version included quite a few updates and number of new cmdlets to manage things like vCenter Alarms, VMware Cloud on AWS, and Content Library.

The new cmdlets for Content Library management are as follows:

  • New-ContentLibraryItem
  • Set-ContentLibraryItem
  • Remove-ContentLibraryItem
  • Export-ContentLibraryItem
  • New-ContentLibrary
  • Set-ContentLibrary
  • Get-ContentLibrary
  • Remove-ContentLibrary

As part of a tandem blog post with Nigel, we’re going to walk through interacting with a Content Library. Nigel will handle the tasks from the vSphere Client side over on the vSphere blog post “Creating and Using Content Library” and I’ll be showing how to do those same tasks with the new PowerCLI cmdlets here!

Creating a Local Content Library

First things first, in order to manage a Content Library, we need to create one. Luckily, one of the new cmdlets turns this process from roughly a 10-line process into, essentially, a one-liner!

The key pieces of information we need to make note of prior to creating a new local Content Library by running the New-ContentLibrary cmdlet:

  • Name
  • Description (optional, but recommended)
  • Whether publishing should be enabled
  • Datastore location

For my environment, I can use the following code to create a new local Content Library:

Demo: Creating a Content Library

Adding Items to Content Library

A Content Library can be used to store and share a number of things. From VMs to templates, scripts to certificates, we can import and make use of these items from any vCenter which has access. The first item we’ll be adding to our new Content Library is going to be a PowerShell script, which is small and simple to import.

For this task, we will want to identify a script to import and get familiar with the new cmdlet, New-ContentLibraryItem. This cmdlet has a couple parameters we will need to populate:

  • ContentLibrary: the Content Library we are looking to interact with
  • Files: the file/s to be imported to the Content Library
  • Name: the name of the item displayed in the Content Library

I’ll be referencing a script from one of the last PowerCLI blogs, Get-TriggeredAlarms.ps1, which I have stored in a local git repository.

We can use the following code to create a new Content Library item by importing our PowerCLI script:

Sample: Import Content Library Item

Exporting Items from Content Library

We have created a Content Library and imported our first item. The next step would be to use that item. There’s no native way to run, or even modify, our imported script, so we will want to export the script so we can run it from our local PowerShell session. In order to do this, we will use another new cmdlet named Export-ContentLibraryItem

There are two main parameters we will need to use for this task:

  • ContentLibraryItem: the item we’re looking to export
  • Destination: this is the location of where the item should be downloaded and stored to

We can use the following code to export our script from the Content Library:

Sample: Export Content Library Item

Remove Item from Content Library

For our last task, we’re going to complete the lifecycle of a Content Library item by removing our PowerCLI script. In order to accomplish this task, PowerCLI has another new cmdlet which can simplify this task to a single line by using Remove-ContentLibraryItem

There’s only one parameter we need to be concerned with, and that is the following:

  • ContentLibraryItem: this is the item we’re looking to remove

We can use the following code to remove our script from the Content Library:

Sample: Remove Content Library Item


Content Library is one of those vSphere features with so much untapped potential. This blog post took a look at how the release of PowerCLI 11.5 can streamline the management of a Content Library and the entire lifecycle of those items it contains.

Let us know in the comments how you’re using PowerCLI to automate the Content Library!

More information about PowerCLI 11.5’s release: New Release – PowerCLI 11.5.0
More information about performing these tasks in the vSphere Client: Creating and Using Content Library


72 comments have been added so far

  1. Are you looking for the optimum yet affordable SEO Packages? Don’t go beyond, we have designed our SEO Packages in Delhi to match your economy as well as to get ranking on SERP.

  2. Plan a visit to Chardham as this yatra will take you to another world of beautiful landscapes with dense mountain forests, large valleys, waterfalls, flowing rivers etc. Arrow Aircraft provides Chardham Yatra by Helicopter. Get the best Chardham Helicopter Booking Price by Arrow AirCraft.

  3. There is still a big in New-ContentLibraryItem, I dont see a way to specify the file type. Example if I upload an ISO file, it is unmount able to a VM because the type is “file” , the web API has a parameter called type but just not the PowerCLI. I would be happy to help code this but I’m unsure as to where to begin.

  4. Thanks you so much for being my wife. there is nothing more than wishing a wife a happy wedding anniversary. thus I came up with this new colllection of anniversary messages that you can share with your life partener.

  5. I was recently tasked with migrating hundreds of ISO files from NFS to leverage the new content library functionalities, so naturally I turned to Powershell. I noticed that all of the ISOs were uploading as filetype “file” as opposed to filetype “Iso”. This is a big problem, because Isos can’t be mounted to a machine in VCenter without them being recognized as filetype “Iso”.

    I ended up fixing the problem by manipulating the VCenter database directly (which I do not recommend under normal circumstances), however, a parameter to set the filetype while uploading with Powershell would have saved me a lot of time and a big headache. Is this a feature that could be added? Or is there a safer way to fix this problem?

  6. Hey, Kylle Ruddy, Thanks for sharing this amazing post. At first, I was a little confused about removing the item from the content library. But your blog has cleared all my doubt. I learnt a couple of new and interesting things I didn’t know about. You must have spent hours in the research! Great Job, Kylle 🙂

  7. I really appreciate you for publishing this blog here about what’s new content library; it’s really a helpful and very useful for us. This is really appreciated that you have presented this data over here, I love all the information shared. Great article!Do check out this, it has some great and nice ideas to look for.

  8. I really appreciate you for publishing this blog here about what’s new content library; it’s really a helpful and very useful for us. This is really appreciated that you have presented this data over here, I love all the information shared. Great article!I have seen similar information at one place, you can also see on

  9. I am so happy I found your blog and I absolutely love your information about whats new content library and the tips you have shared are awesome. I liked and it is wonderful to know about so many things that are useful for all of us! Thanks a lot for this amazing blog!!

  10. This wonderful article is addressing on the new content library. I loved reading this article. Here the tips and tricks for addressing such are mentioned. Such content must be made more and more available. Thank you for this article!! This is really very informative.Do check out this it has some great and nice ideas to look for.

  11. Wonderful article. It’s very useful. As a news service provider, I really appreciate your post.
    checkout Washington News Post : Latest News ,World News ,USA News

  12. Someone Sometimes with visits your blog regularly and recommended it in my experience to read as well. The way of writing is excellent and also the content is top-notch. Thanks for that insight you provide the readers!

  13. Thanks for taking the time to discuss that, I feel strongly about this and so really like getting to know more on this kind of field. Do you mind updating your blog post with additional insight? It should be really useful for all of us.

  14. ProVen Review ProVen is not precisely the weight-loss dietary supplement that everybody is looking for. Judging from the ingredients, it works more as an antioxidant of sorts. If you want a better immune system and healthier cardiovascular health, then you should certainly try this product out.proven supplement @

  15. The instructions on how to take ProVen are clearly explained on the bottle. As I knew the ProVen supplement would help me to detox, I took it in the morning. As the supplement only contains natural ingredients, the body recognizes it as food and digests it quickly.

  16. White label SEO services are a procedure for optimizing a website and improving link building status. The packages are sold by companies to SEO agencies but back away from fulfilling in-house tasks. Several agencies benefit because of the high-profit margin by partnering with experienced firms.

  17. The importance of nutrition in development cannot be overstated. Children who may not receive enough nutrition will not grow as tall as children who do. Children and young people can consume a diverse, nutritious diet that contains lots of fruits and vegetables, according to nutritionists. This would ensure that they obtain all of the vitamins and minerals they need to grow and flourish and you can also use growth pills.

  18. If the internet has shown us something, it’s that the universe is practically at the fingertips. And the world of film is just a few taps away. Enable films to be your savior—and your escape—as we begin yet another week of lockdown. And, this time, how about some South Indian films? South Indian films—Telugu, Tamil, Malayalam, Kannada, and Tulu—which you can find on Movies machi, have captured the attention of many cinephiles in recent years, not because they are amusing, but because they have endearing and convincing stories that are nuanced and raw, deviating from conventional cinema tropes. Actors such as Dulquer Salman, Parvathy Thiruvothu, Vijay Sethupathi, Dhanush, Nivin Pauly, and Vijay and others, have become increasingly popular, with a devoted fan base

  19. Nice Post. Thank you for sharing.

    In case you begun looking for a treadmill on the websites, you’ve most likely run over a significant number of retailers promoting the best sales, offers and deals. One of these retailers might be Costco. In spite of the fact that we love the store for every one of the offers, deals and investment funds it offers on pretty much all the other things, one zone that they don’t sparkle in is wellness and fitness equipment. There are two types of treadmills available to be purchased on their site. The absence of choices is only one of the numerous issues with purchasing a treadmill at Costco. If you are not looking for much of a variation, Costco is a must-buy option. Visit More:-

  20. Very Nice… i really like your post…

    If you’ve heard of Dan Bilzerian, which we’re guessing you have because you’re reading this, you’ve probably seen pictures of him with quick cars, large sums of money, and typically surrounded by a slew of beautiful women, but why? Why is Dan Bilzerian so well-known? What is dan bilzerian net worth? Dan Bilzerian is well known for his participation in poker tournaments, where he claims to have won the majority of his earnings.

    He has become popular for his lavish lifestyle as a result of his wealth, sharing his luxurious adventures on social media to his 32 million followers (as of Feb 2021). Bilzerian became wealthy by playing high-stakes poker and working as a professional stuntman. His fortune began with a lump sum from a trust fund left by his father to some Bilzerian. Visit More:-

  21. This is very informative and interesting…

    It’s significant because one of the most effective ways for any pet owner to influence their pet’s health and quality of life is to feed them the best diet possible. The consistency of the food you feed your pet has a significant impact on his or her welfare. The main term here is consistency, as in the quality of the foods used to make the pet food you eat.

    The old adage “You are what you eat” holds true for our pets just as well as it does for us. A higher quality of life is achieved by eating foods made from higher quality ingredients dogs foods like pedigree dog food. Less scratching, ear infections, shinier coats, less infectious bowel disease, smoother muscling and muscle tone, healthier muscles, more stamina, better disposition, and other obvious physical benefits of healthy diet are the consequence. Dogs are more content and sleep healthier in general. Visit More:-

  22. Thank you for this post. Good luck.

    For many people who choose to spend their spare time indoors, watching movies is a common type of entertainment. You may partake in a number of outdoor events. If you don’t like going outdoors or engaging in adrenaline-pumping practices, you will find ways to relax yourself indoors. Watching movies on online platforms like Europix movies will help you unwind.

    You can achieve high degrees of concentration, which is beneficial to the brain. Sitting on the sofa for hours watching a movie is also a great way to unwind after a long and exhausting day or week. Some films have an educational plot that serves to convey a specific message to the audience. You can choose from a variety of film genres to watch. Horror, action, humor, and adventure are only a few examples. Visit More:-

Leave a Reply

Your email address will not be published. Required fields are marked *