Syntax
Set-ContentLibrary [-SubscribedContentLibrary] <SubscribedContentLibrary[]> [-AutomaticSync] [-Confirm] [-Description <String>] [-DisableAuthentication] [-DownloadContentOnDemand] [-Name <String>] [-Password <String>] [-Server <VIServer[]>] [-SslThumbprint <String>] [-SubscriptionUrl <String>] [-WhatIf] [<CommonParameters>]Related Commands
Detailed Description
This cmdlet modifies content library's properties.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
LocalContentLibrary | LocalContentLibrary[] | A local content library whose properties you want to alter. | true | True (ByValue) | |
SubscribedContentLibrary | SubscribedContentLibrary[] | Specifies a subscribed content library which properties you want to alter. | true | True (ByValue) | |
AutomaticSync | SwitchParameter | If specified, synchronization of content library items happens automatically. If not, synchronization happens by using the Set-ContentLibrary cmdlet with the Sync parameter. | false | False | |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | False | |
CurrentPassword | String | 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. | false | False | |
Description | String | Specifies a human-readable description for the content library that you want to create. | false | False | |
DisableAuthentication | SwitchParameter | If specified, disables authentication of the content library. | false | False | |
DownloadContentOnDemand | SwitchParameter | 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. | false | False | |
Evict | SwitchParameter | Removes cached content library's items content of a subscribed content library whose content is downloaded on demand. | true | False | |
Name | String | Specifies a new name for the content library. | false | False | |
Password | String | Specifies the password that you want to set or update to the target content library. | false | False | |
PersistJson | SwitchParameter | 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. | false | False | |
Published | SwitchParameter | Specifies whether you want to publish the local library. | false | False | |
Server | VIServer[] | 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. | false | False | |
SslThumbprint | String | 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. | false | False | |
SubscriptionUrl | String | Specifies the URL of the endpoint where the metadata for the remotely published library is served. | false | False | |
Sync | SwitchParameter | If specified, manually synchronizes the subscribed content library. | true | False | |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | False |
Return Type
Zero or more modified LocalContentLibrary or SubscribedContentLibrary objectsNotes
Examples
-------------------------- Example 1 --------------------------
PS C:\> $contentLibrary = Get-ContentLibrary -Name 'Content Library' -Local PS C:\> 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 --------------------------
PS C:\> $subscribedContentLibrary = Get-ContentLibrary -Name 'Content Library' -Subscribed PS C:\> Set-ContentLibrary -SubscribedContentLibrary $subscribedContentLibrary -Sync
Manually synchronizes a subscribed content library named 'Content Library'.
-------------------------- Example 3 --------------------------
PS C:\> $subscribedContentLibrary = Get-ContentLibrary -Name 'Content Library' -Subscribed PS C:\> Set-ContentLibrary -SubscribedContentLibrary $subscribedContentLibrary -Evict
Removes cached content library items' content of subscribed content library that has -DownloadContentOnDemand set.