Powershell: 7.2.4
DVLS Server: 2022.1.10.0
DVLS PS Module: 2022.1.10.1
Im trying to Update a Vault by using Update-DSVault @UpdatedVault but it always fails with:
$UpdatedVault is a simple Hashtable which contains VaultID (guid), Name (string), Description (string) and IsAllowedOffline (bool).
Also for me it looks like there is a missing Parameter here:
devolutions-server/Update-DSVault.ps1 at main · Devolutions/devolutions-server · GitHub
Should be Get-DSVault -VaultID $VaultID if im right (param -VaultID):
I also tried it with direct params:Update-DSVault -VaultID $Vault.id -Name $Vault.name.trim() -Description $cust.Id.trim() -IsAllowedOffline $false
This also doesnt look very well for me:
...even if i force declaring the Vault.id as Guid via ([guid]$Vault.id).Guid it looks like above..
Best Regards,
Andreas
Edit:
So this looks also invalid for me:
devolutions-server/Update-DSVault.ps1 at main · Devolutions/devolutions-server · GitHub
[guid]$VaultID = $(throw "Vault ID is null or empty. Please provide a valid vault ID and try again.")
After changing both parts in Update-DSVault.ps1, the update procedure works for me.
Hi Andreas,
I will ask our engineer to verify about the modification you made in Update-DSVault.ps1. Once an update will be available, we will post it here.
Best regards,
Érica Poirier
Hi Andreas,
'Get-DSVault' default parameter set is 'GetPage', which takes 'PageSize' (default 25) and 'PageNumber' (default 1). When calling 'Get-DSVault' without specifying the parameter we're passing, PowerShell expects to receive two integers, hence the first error message received.
I fixed 'Update-DSVault' by adding the parameter name to 'Get-DSVault' to use the correct parameter set.
Thank you and have a nice day,
Alexandre Martigny