Updates an Item in Vault and manipulates its associations.

Update-VaultItem -Number <String> [-NewNumber <String>] [-Title <String>] [-Description <String>] [-Properties <Hashtable>] [-AddAttachments <String[]>] [-Attachments <String[]>] [-RemoveAttachments <String[]>] [<CommonParameters>]

Type Name Description Optional
StringNumberNumber of the Item, that should be updatedno
StringNewNumberNew Number that renames the Item by using the 'Mapped' Numbering Scheme. This scheme allows entering free item names.yes
StringTitleThe new title of the Itemyes
String DescriptionThe new description of the Itemyes
HashtablePropertiesThe user-defined properties and their values which should be updated on the Itemyes
String[]AddAttachmentsFull paths to the Vault files that should be attached to the Itemyes
String[]AttachmentsFull paths to the Vault files that will replace the existing attachments of the Itemyes
String[]RemoveAttachmentsFull paths to the Vault files which should be detached from the Itemyes

Item ← on success
empty ← on failure

In order to update properties of an Item the -Properties argument allows updating the values of used-defined properties which can be passed using their:

  • system names are prefided with '_' and can be used with all Vault language environments (e.g. @{'_ItemEffectivity' = …} )
  • display names (e.g. @{'Effectivity' = …} can be used with English Vault or @{'Gültigkeit' = …} can be used with german Vault environments).

Vault files can be attached to an Item using the -AddAttachments parameter, by passing an array of Vault file paths.
In the same way, all the existing attachment associations can be replaced using the -Attachments parameter and individual Vault files can be detached using -RemoveAttachments.
When some existing attachments are checked-out, then powerVault will check-in the previous file version of them.

You can only make changes to the items you could do with the vault client.

Rename an Item in Vault:

$item = Update-VaultItem -Number '100017' -NewNumber '111111'

Update the details of a Vault Item:

$item = Update-VaultItem -Number '100017' 
   -Title "FINAL PART" 
   -Description "COMBO STAND OFF" 
   -Properties @{'Test'='Updated'}

Assign attachments to a Vault Item:

$parent = Get-VaultItem -Number 100001
$attachment = Get-VaultFile -File "$/Designs/ABC.ipt"

$parentUpdated = Update-VaultItem -Number $parent.Number -Attachments @($attachment.'Full Path')

Detach files from a Vault Item:

$item= Get-VaultItem -Number 100001
$attachment = Get-VaultFile -File "$/Designs/ABC.ipt"

$itemUpdated = Update-VaultItem -Number $item.Number -RemoveAttachments @($attachment.'Full Path')

Attach a new file to a Vault Item:

$item= Get-VaultItem -Number 100001
$attachment= Add-VaultFile -From "C:\Temp\ABC.ipt" -To "$/Designs/ABC.ipt"

$itemUpdated = Update-VaultItem -Number $item.Number -AddAttachments @($attachment.'Full Path')