PowerCLI Reference

Set-ContentLibraryItem

Synopsis

This cmdlet modifies content library item's properties.

Syntax

Set-ContentLibraryItem [-ContentLibraryItem] <ContentLibraryItem[]> [-Confirm] [-Files <String[]>] [-Name <String>] [-Notes <String>] [-Server <VIServer[]>] [-WhatIf] [<CommonParameters>]

Related Commands

Detailed Description

This cmdlet modifies content library item's properties.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
ContentLibraryItemContentLibraryItem[]Specifies the content library item whose properties you want to change.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
FilesString[]Specifies paths to the local files that substitute the current content library item's files.


Note: If the Files parameter is not specified, current content library item's files do not get altered.
falseFalse
NameStringSpecifies a new name for the content library item.falseFalse
NotesStringSpecifies a new description for the content library item.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 modified ContentLibraryItem objects

Notes

Examples

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

PS C:\> $files = Get-ChildItem -File
PS C:\> $item = Get-ContentLibraryItem -Name 'vm1'
PS C:\> Set-ContentLibraryItem -ContentLibraryItem $item -Name 'New name' -Files $files

Modifies content library item named 'vm1' by setting its name to 'New name and updates its files to the current content of the C: directory.


Copyright © VMware, Inc. All rights reserved.