New-ContentLibrary
This cmdlet creates a new new local or subscribed content library depending on the provided parameters.
Syntax
-Datastore
<Datastore>
-Name <String>
[-Description <String>]
[-OptimizeRemotePublishing]
[-Password <String>]
[-PersistJson]
[-Published]
[-Server <VIServer[]>]
[CommonParameters]
-Name <String>
[-Description <String>]
[-OptimizeRemotePublishing]
[-Password <String>]
[-PersistJson]
[-Published]
[-Server <VIServer[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
Datastore | named |
|
Specifies the datastore that you want to use to store files for library items in this library. | required |
|
String | named |
|
Specifies the name of the library. Library names cannot be undefined or an empty string. Names do not have to be unique. | optional |
|
String | named |
|
Specifies a human-readable description for the content library that you want to create. | optional |
|
SwitchParameter | named |
|
If specified, the library is optimized for remote publishing and the Published parameter is required. | optional |
|
String | named |
|
Specifies the password you want to use for the content library. | optional |
|
SwitchParameter | named |
|
Specifies whether library and library item metadata are persisted in the storage location as JSON files. This flag only applies if the local library is published. | optional |
|
SwitchParameter | named |
|
Specifies whether you need to publish the local library. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value 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. |
-Datastore
<Datastore>
-Name <String>
-SubscriptionUrl <String>
[-AutomaticSync]
[-Description <String>]
[-DownloadContentOnDemand]
[-Password <String>]
[-Server <VIServer[]>]
[-SslThumbprint <String>]
[CommonParameters]
-Name <String>
-SubscriptionUrl <String>
[-AutomaticSync]
[-Description <String>]
[-DownloadContentOnDemand]
[-Password <String>]
[-Server <VIServer[]>]
[-SslThumbprint <String>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
Datastore | named |
|
Specifies the datastore that you want to use to store files for library items in this library. | required |
|
String | named |
|
Specifies the name of the library. Library names cannot be undefined or an empty string. Names do not have to be unique. | required |
|
String | named |
|
Specifies the URL of the endpoint where the metadata for the remotely published library is served. | optional |
|
SwitchParameter | named |
|
Specifies whether the library should participate in automatic library synchronization. If you want to do an automatic synchronization, the global Automatic Sync option must be enabled. | optional |
|
String | named |
|
Specifies a human-readable description for the content library that you want to create. | optional |
|
SwitchParameter | named |
|
Indicates whether a library item's content is synchronized only on demand. | optional |
|
String | named |
|
Specifies the password you want to use for the content library. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value 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 |
|
String | named |
|
Specifies an optional SHA-1 hash of the SSL certificate for the remote endpoint. |
Output
VMware.VimAutomation.ViCore.Types.V1.ContentLibrary.ContentLibrary
Examples
Example 1
PS C:\> New-ContentLibrary -Name 'Local Content Library' -Description 'Local content library description.' -Datastore $Datastore1 -Published
Creates a new local content library that uses Datastore1 as a repository for its items.
Example 2
PS C:\> $localContentLibrary = Get-ContentLibrary -Name 'Local Content Library' -Local
PS C:\> New-ContentLibrary -Name 'Subscribed Content Library' -Description 'Subscribed content library description.' -Datastore $Datastore1 -SubscriptionUrl $localContentLibrary.PublishUrl
Creates a new subscribed content library that is subscribed to $localContentLibrary and uses Datastore1 as a repository for its items.
Related Commands
ContentLibrary
This cmdlet creates a new local or subscribed content library.
This cmdlet modifies content library's properties.
This cmdlet removes the specified content libraries.
Creates a new local or subscribed content library that uses Datastore1 as a repository for its items.
ContentLibraryItem
This cmdlet retrieves catalog items from the content library.
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 modifies content library item's properties.
This cmdlet removes the specified content library items.
This cmdlet creates a new content library item in the specified content library.