< Back
Set-ContentLibraryItem
Post
NAME 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>]
DESCRIPTION
This cmdlet modifies content library item's properties.
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 whose properties you want to change.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String>
Specifies a new name for the content library item.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Notes <String>
Specifies a new description for the content library item.
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
VMware.VimAutomation.ViCore.Types.V1.ContentLibrary.ContentLibraryItem[]
OUTPUTS
Zero or more modified ContentLibraryItem objects
NOTES
-------------------------- 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.
RELATED LINKS
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>]
DESCRIPTION
This cmdlet modifies content library item's properties.
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 whose properties you want to change.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String>
Specifies a new name for the content library item.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Notes <String>
Specifies a new description for the content library item.
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
VMware.VimAutomation.ViCore.Types.V1.ContentLibrary.ContentLibraryItem[]
OUTPUTS
Zero or more modified ContentLibraryItem objects
NOTES
-------------------------- 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.
RELATED LINKS