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
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
ContentLibraryItem | ContentLibraryItem[] | Specifies the content library item whose properties you want to change. | true | True (ByValue) | |
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. | false | False | |
Files | String[] | 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. | false | False | |
Name | String | Specifies a new name for the content library item. | false | False | |
Notes | String | Specifies a new description for the content library item. | false | 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. | false | False | |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | False |
Return Type
Zero or more modified ContentLibraryItem objectsNotes
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.