< Back

Set-ContentLibrary

Sun Jan 19, 2020 7:07 pm

NAME Set-ContentLibrary



SYNOPSIS

This cmdlet modifies content library's properties.





SYNTAX

Set-ContentLibrary [-SubscribedContentLibrary] <SubscribedContentLibrary[]> [-AutomaticSync] [-Confirm]

[-Description <String>] [-DisableAuthentication] [-DownloadContentOnDemand] [-Name <String>] [-Password <String>]

[-Server <VIServer[]>] [-SslThumbprint <String>] [-SubscriptionUrl <String>] [-WhatIf] [<CommonParameters>]



Set-ContentLibrary [-LocalContentLibrary] <LocalContentLibrary[]> [-Confirm] [-CurrentPassword <String>]

[-Description <String>] [-DisableAuthentication] [-Name <String>] [-Password <String>] [-PersistJson] [-Published]

[-Server <VIServer[]>] [-WhatIf] [<CommonParameters>]



Set-ContentLibrary [-SubscribedContentLibrary] <SubscribedContentLibrary[]> [-Confirm] -Evict [-Server

<VIServer[]>] [-WhatIf] [<CommonParameters>]



Set-ContentLibrary [-SubscribedContentLibrary] <SubscribedContentLibrary[]> [-Confirm] [-Server <VIServer[]>]

-Sync [-WhatIf] [<CommonParameters>]





DESCRIPTION

This cmdlet modifies content library's properties.





PARAMETERS

-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.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Description <String>

Specifies a human-readable description for the content library that you want to create.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DisableAuthentication [<SwitchParameter>]

If specified, disables authentication of the content library.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Evict [<SwitchParameter>]

Removes cached content library's items content of a subscribed content library whose content is downloaded on

demand.



Required? true

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-LocalContentLibrary <LocalContentLibrary[]>

A local content library whose properties you want to alter.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-Name <String>

Specifies a new name for the content library.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Password <String>

Specifies the password that you want to set or update to the target content library.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Published [<SwitchParameter>]

Specifies whether you want to publish the local library.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-SubscribedContentLibrary <SubscribedContentLibrary[]>

Specifies a subscribed content library which properties you want to alter.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



-SubscriptionUrl <String>

Specifies the URL of the endpoint where the metadata for the remotely published library is served.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Sync [<SwitchParameter>]

If specified, manually synchronizes the subscribed content library.



Required? true

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are

modified.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

VMware.VimAutomation.ViCore.Types.V1.ContentLibrary.LocalContentLibrary[]

VMware.VimAutomation.ViCore.Types.V1.ContentLibrary.SubscribedContentLibrary[]





OUTPUTS

Zero or more modified LocalContentLibrary or SubscribedContentLibrary objects







NOTES









-------------------------- 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.



RELATED LINKS