PowerCLI Reference

Get-ContentLibrary

Synopsis

This cmdlet creates a new local or subscribed content library.

Syntax

Get-ContentLibrary [-Confirm] -Id <String[]> [-Server <VIServer[]>] [-WhatIf] [<CommonParameters>]

Get-ContentLibrary [[-Name] <String[]>] [-Confirm] [-Local] [-Server <VIServer[]>] [-Subscribed] [-WhatIf] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet retrieves content libraries and returns a set of content libraries that correspond to the filter criteria defined by the cmdlet parameters.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
NameString[]Specifies the names of the content libraries you want to retrieve.falseFalse
ConfirmSwitchParameterIf 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.falseFalse
IdString[]Specifies the IDs of the content libraries you want to retrieve.trueFalse
LocalSwitchParameterSpecifies that you want to retrieve only the local content libraries.falseFalse
ServerVIServer[]Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet.falseFalse
SubscribedSwitchParameterSpecifies that you want to retrieve only the subscribed content libraries.falseFalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falseFalse

Return Type

Zero or more LocalContentLibrary or SubscribedContentLibrary objects

Notes

Examples

-------------------------- Example 1 --------------------------

PS C:\> Get-ContentLibrary

Retrieves all content libraries from the default connected servers.

-------------------------- Example 2 --------------------------

PS C:\> Get-ContentLibrary -Local

Returns all local content libraries from the default connected servers.

-------------------------- Example 2 --------------------------

PS C:\> Get-ContentLibrary -Name 'Local*'

Retrieves all content libraries whose name starts with 'Local' from the default connected servers.


Copyright © VMware, Inc. All rights reserved.