Managing Content Libraries
In this section, we will discuss how we can utilize the vCloud Suite SDK and combine it with the vCenter Server APIs to manage a content library in vCenter Server. To do this, first we need to import the module VMware.VimAutomation.Cis.Core
. We can check the cmdlets available with this module by running the following command:
PS C:\> Get-Command -Module VMware.VimAutomation.Cis.Core | Select Name Name ---- Connect-CisServer Disconnect-CisServer Get-CisService
So let's first connect to the vCloud Suite SDK server:
To get a list of all the services available and their description, run the cmdlet Get-CisService
:
$Library = Get-CisService com.vmware.content.local_library
The result of the preceding command is shown in the following screenshot:
As you can see from the description in the screenshot, this service manages the local libraries. So, we will use this service to manage the content library.
To get a list of available libraries...