Entry updated with Powershell doesn't update expiration correctly
Hi Devolutions,
I'm having a solution where I will update a lot of entries in an RDM vault regularly with Powershell.
To know when then the information is expiring, I'm using the attribute "$rdmSession.MetaInformation.Expiration".
It works fine to set the value with Powershell, and I can read it out again.
The code I'm using is similar to the code here:$rdmSession = Get-RDMSession -Name <sessionname>$rdmSession.MetaInformation.Expiration = (Get-Date).AddDays(30)Set-RDMSession -Session $rdmSession -Refresh
The problem occurs in the UI. The "Expiration Date" is set correctly, but when the entry is expired, it will show as "[Expired]" in the tree-view and in the overview for the vault.
If I open the settings for an entry there is expired, and just clicking "Ok" (without changing anything), it will update the tree-view, and remove the "[Expired]" for that single entry and also remove it from the "Expired entries" in the vault overview.
I'm using RDM version 2022.1.27 64-bit and PS module version 2022.1.3.3
Am I missing something in my update in Powershell, or have I found "an expected feature"? :)
Cheers,
Anders
Hello,
With your sample script, I cannot reproduce this behaviour. When editing the entry and click on OK, the entry's name is still red with the [Expired] tag and still in the "Expired entries" vault's overview.
What data source type are you connected to?
Best regards,
Érica Poirier
Hi Érica,
I'm using an Microsoft SQL database.
Br,
Anders
Hi Erica,
It's only visible after the record has expired first time. When it is initially created, it isn't a problem.
You can try to reduce the number of days to 1, and then try again the day after tomorrow.
Br,
Anders
Hi Anders,
Thank you for the information. I will try that and will keep you updated.
Best regards,
Érica Poirier
Hi Erica,
Have you had time to test it? :)
//Anders
Hi Anders,
Yes I did and cannot reproduced your behaviour.
Could you please send an email to service@devolutions.net so we can verify this behaviour in a remote session? Please add a reference to this thread in your message.
Best regards,
Érica Poirier
Hi Anders,
As mentioned in the support session, I have submitted a ticket to our engineering team.
Once the problem will be fixed, we will update this thread.
Best regards,
Érica Poirier
Hi,
Version 2022.3, scheduled to release today, will contain a fix for this issue.
Regards
Jonathan Lafontaine
Hi,
Forgot to reply. The update is working for us. Thank you for fixing the problem. :)
Cheers,
Anders