PowerCLI Reference

Export-ContentLibraryItem

Synopsis

This cmdlet exports content library item's files to the local machine.

Syntax

Export-ContentLibraryItem [-ContentLibraryItem] <ContentLibraryItem[]> [-Confirm] [-Destination <String>] [-Force] [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet exports content library item's files to the local machine.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
ContentLibraryItemContentLibraryItem[]Specifies the content library item whose content you want to export.trueTrue (ByValue)
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
DestinationStringSpecifies an existing local directory where you want to save the content library items.


Note: If the parameter is not specified, your current directory will be used.
falseFalse
ForceSwitchParameterSpecifies if you want to overwrite existing files with the same name that exist in the destination directory.falseFalse
RunAsyncSwitchParameterIndicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter, run "help About_RunAsync" in the VMware PowerCLI console.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
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 DirectoryInfo objects

Notes

Examples

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

PS C:\> $item = Get-ContentLibraryItem -Name 'vm1'
PS C:\> Export-ContentLibraryItem -ContentLibraryItem $item -Destination ./vm1-files

Exports 'vm1' content library item's files to the C:\vm1-files directory.


Copyright © VMware, Inc. All rights reserved.