Update-VaultFile returns $null values in Vault 2023

Issue

When calling Update-VaultFile in Vault 2023 for a file that has a state glyph all returned properties have $null as value and multiple warnings are logged.

state_glyph_error_message

powerVault.Cmdlets.Cmdlets.Vault.Facade.VaultPropertyReader - VaultPropertyReader.RetrievePropertyValuesFromVault([ {Bauteil1.ipt} ]) | Failed, exception = {NullReferenceException}

 

powerVault.Cmdlets.Cmdlets.Vault.Facade.VaultPropertyReader - VaultPropertyReader.GetPropertyValues({powerVault.Cmdlets.Cmdlets.Vault.Facade.Files.VaultFileImpl}) | Failed, exception = {NullReferenceException}.

 

powerVault.Cmdlets.Cmdlets.Vault.Facade.VaultPropertyReader+? - ?.get_Value() | Failed, exception = {NullReferenceException}.

Image of a state glyph:

state_glyph

Solution

The warnings can be ignored, but if the property values must be used after the update you can call Get-VaultFile directly after Update-VaultFile to get the correct values.

For example:

$updatedFile = Update-VaultFile -File $file._FullName -Properties @{ UDP1 = 'newValue' }
$updatedFile = Get-VaultFile $file._FullName