< Back
Copy-ContentLibraryItem
Post
NAME Copy-ContentLibraryItem
SYNOPSIS
This cmdlet copies content library items to a local content library.
SYNTAX
Copy-ContentLibraryItem [-ContentLibraryItem] <ContentLibraryItem[]> [-Confirm] -Destination <LocalContentLibrary>
[-Name <String>] [-Notes <String>] [-Server <VIServer[]>] [-WhatIf] [<CommonParameters>]
DESCRIPTION
This cmdlet copies content library items to a local content library.
PARAMETERS
-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
-ContentLibraryItem <ContentLibraryItem[]>
Specifies the content library item that you want to copy.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-Destination <LocalContentLibrary>
Specifies the local content library where you want to copy the item.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Name <String>
Specifies the name on the library item. Library item names cannot be undefined or an empty string. Names do
not have to be unique.
Note: If not specified, the name of the source content library item will be used.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Notes <String>
Specifies a human-readable description for the content library item that you want to copy.
Required? false
Position? named
Default value None
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 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.
Required? false
Position? named
Default value None
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
Zero or more ContentLibraryItem objects
OUTPUTS
System.Void
NOTES
-------------------------- Example 1 --------------------------
PS C:\\> $item = Get-ContentLibraryItem -Name 'vm1'
PS C:\\> $library = Get-ContentLibrary -Name 'Local content library' -Local
PS C:\\> Copy-ContentLibraryItem -ContentLibraryItem $item -Destination $library
Copies a content library item named 'vm1' to the 'Local content library' content library.
RELATED LINKS
SYNOPSIS
This cmdlet copies content library items to a local content library.
SYNTAX
Copy-ContentLibraryItem [-ContentLibraryItem] <ContentLibraryItem[]> [-Confirm] -Destination <LocalContentLibrary>
[-Name <String>] [-Notes <String>] [-Server <VIServer[]>] [-WhatIf] [<CommonParameters>]
DESCRIPTION
This cmdlet copies content library items to a local content library.
PARAMETERS
-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
-ContentLibraryItem <ContentLibraryItem[]>
Specifies the content library item that you want to copy.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-Destination <LocalContentLibrary>
Specifies the local content library where you want to copy the item.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Name <String>
Specifies the name on the library item. Library item names cannot be undefined or an empty string. Names do
not have to be unique.
Note: If not specified, the name of the source content library item will be used.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Notes <String>
Specifies a human-readable description for the content library item that you want to copy.
Required? false
Position? named
Default value None
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 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.
Required? false
Position? named
Default value None
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
Zero or more ContentLibraryItem objects
OUTPUTS
System.Void
NOTES
-------------------------- Example 1 --------------------------
PS C:\\> $item = Get-ContentLibraryItem -Name 'vm1'
PS C:\\> $library = Get-ContentLibrary -Name 'Local content library' -Local
PS C:\\> Copy-ContentLibraryItem -ContentLibraryItem $item -Destination $library
Copies a content library item named 'vm1' to the 'Local content library' content library.
RELATED LINKS