Closed redboyhun closed 2 years ago
The Update Safe API uses PUT requests, which would usually require all properties to be specified.
Consider piping the required data in from the existing object:
> Get-PASSafe -SafeName MySafe1212
SafeName ManagingCPM NumberOfDaysRetention NumberOfVersionsRetention Description
-------- ----------- --------------------- ------------------------- -----------
MySafe1212 CPM1 90 MySafe1212
> Get-PASSafe -SafeName MySafe1212 | Set-PASSafe -NumberOfVersionsRetention 15
SafeName ManagingCPM NumberOfDaysRetention NumberOfVersionsRetention Description
-------- ----------- --------------------- ------------------------- -----------
MySafe1212 CPM1 15 MySafe1212
You can test the API manually to confirm that the same behaviour is exhibited when not using the module, hence no fix to be applied to the module's code: https://pspas.pspete.dev/docs/troubleshooting/#manual-api-command-testing
Set-PASSafe is overwriting safe parameters which are not defined for the command with empty values
My expectation is that non-defined values won't be replaced by "null" or "whitespace".
Environment: