Set-ContentLibrary
This cmdlet modifies content library's properties.
Syntax
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required
|
Evict | SwitchParameter | named |
|
Removes cached content library's items content of a subscribed content library whose content is downloaded on demand. |
required
|
SubscribedContentLibrary | SubscribedContentLibrary[] | named |
|
Specifies a subscribed content library which properties you want to alter. |
optional | ProgressAction | ActionPreference | named |
|
|
optional | Server | VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no given is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet. |
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required
|
LocalContentLibrary | LocalContentLibrary[] | named |
|
A local content library whose properties you want to alter. |
optional | CurrentPassword | String | named |
|
Indicates if you want to update a password protected content library. Currently set password is supplied to complete the operation. Note: Available on vCenter Server 6.7 and later. |
optional | Description | String | named |
|
Specifies a human-readable description for the content library that you want to create. |
optional | DisableAuthentication | SwitchParameter | named |
|
If specified, deactivates authentication of the content library. |
optional | Name | String | named |
|
Specifies a new name for the content library. |
optional | Password | String | named |
|
Specifies the password that you want to set or update to the target content library. |
optional | PersistJson | SwitchParameter | named |
|
Specifies whether library and library item metadata are persisted in the storage location as JSON files. This flag only applies if you want to publish the local library. Enabling JSON persistence allows you to synchronize a subscribed library manually instead of over HTTP. You can copy the local library content and metadata to another storage location manually and then create a subscribed library referencing the location of the library JSON file in the SubscriptionUrl. When the subscribed library's storage location matches the subscription URL, you do not need to copy the files to the subscribed library. |
optional | ProgressAction | ActionPreference | named |
|
|
optional | Published | SwitchParameter | named |
|
Specifies whether you want to publish the local library. |
optional | Server | VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no given is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet. |
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required
|
SubscribedContentLibrary | SubscribedContentLibrary[] | named |
|
Specifies a subscribed content library which properties you want to alter. |
optional | AutomaticSync | SwitchParameter | named |
|
If specified, synchronization of content library items happens automatically. If not, synchronization happens by using the Set-ContentLibrary cmdlet with the Sync parameter. |
optional | Description | String | named |
|
Specifies a human-readable description for the content library that you want to create. |
optional | DisableAuthentication | SwitchParameter | named |
|
If specified, deactivates authentication of the content library. |
optional | DownloadContentOnDemand | SwitchParameter | named |
|
Indicates whether a library item's content is synchronized only on demand. If specified, the library item's metadata is synchronized, but the item's content (its files) is not synchronized. The Content Library Service synchronizes the content upon request only. This can cause a noticeable delay when using the content for the first time. If not specified, all content is synchronized in advance. |
optional | Name | String | named |
|
Specifies a new name for the content library. |
optional | Password | String | named |
|
Specifies the password that you want to set or update to the target content library. |
optional | ProgressAction | ActionPreference | named |
|
|
optional | Server | VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no given is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet. |
optional | SslThumbprint | String | named |
|
Specifies an optional SHA-1 hash of the SSL certificate for the remote endpoint. If this value is defined, the SSL certificate is verified by comparing it to the SSL thumbprint. The SSL certificate must be verified against the thumbprint. When specified, the standard certificate chain validation behavior is not used. The certificate chain is validated normally if this value is unset. |
optional | SubscriptionUrl | String | named |
|
Specifies the URL of the endpoint where the metadata for the remotely published library is served. |
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required
|
SubscribedContentLibrary | SubscribedContentLibrary[] | named |
|
Specifies a subscribed content library which properties you want to alter. |
required
|
Sync | SwitchParameter | named |
|
If specified, manually synchronizes the subscribed content library. |
optional | ProgressAction | ActionPreference | named |
|
|
optional | Server | VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no given is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet. |
Output
VMware.VimAutomation.ViCore.Types.V1.ContentLibrary.ContentLibraryExamples
Example 1
$contentLibrary = Get-ContentLibrary -Name 'Content Library' -Local Set-ContentLibrary -LocalContentLibrary $contentLibrary -Name 'Local Content Library' -Description 'This is local content library.'
Modifies a local content library named 'Content Library' by changing its name to 'Local Content Library' and its description to 'This is local content library.'.
Example 2
$subscribedContentLibrary = Get-ContentLibrary -Name 'Content Library' -Subscribed Set-ContentLibrary -SubscribedContentLibrary $subscribedContentLibrary -Sync
Manually synchronizes a subscribed content library named 'Content Library'.
Example 3
$subscribedContentLibrary = Get-ContentLibrary -Name 'Content Library' -Subscribed Set-ContentLibrary -SubscribedContentLibrary $subscribedContentLibrary -Evict
Removes cached content library items' content of subscribed content library that has -DownloadContentOnDemand set.
Related Commands
ContentLibrary
This cmdlet creates a new local or subscribed content library.
Creates a new local or subscribed content library that uses Datastore1 as a repository for its items.
This cmdlet removes the specified content libraries.
This cmdlet modifies content library's properties.
ContentLibraryItem
This cmdlet copies content library items to a local content library.
This cmdlet exports content library item's files to the local machine.
This cmdlet retrieves catalog items from the content library.
This cmdlet creates a new content library item in the specified content library.
This cmdlet removes the specified content library items.
This cmdlet modifies content library item's properties.