You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a session and then use CheckTokenTtl(5). The method returns false until the timespan is 4 minutes or lower and does not account for it at 5 minutes.
Expected behavior
The intent would be getting notified when I'm at or under 5 minutes of the TimeOfDeath time value.
Take $session.TimeOfDeath - (Get-Date), the TotalMinutes value is not a whole number so when it gets to 5.12324 the comparison is no longer accurate. This should be comparing timestamp to timestamp.
So something like $session.TimeOfDeath -le (Get-Date).AddMinutes(5) should provide the expected behavior. If TimeOfDeath is still less than or equal the current timestamp.
What Edition of Secret Server?
Professional
What version of Secret Server
11.0
What PowerShell host was used when producing this error
PowerShell Core (pwsh)
PowerShell Host Version
7.1.4
The text was updated successfully, but these errors were encountered:
Verified issue does not already exist?
Yes
What error did you receive
No error
Please run the command using -Verbose
n/a
Provide a test case or steps to reproduce
Create a session and then use
CheckTokenTtl(5)
. The method returns false until the timespan is 4 minutes or lower and does not account for it at 5 minutes.Expected behavior
The intent would be getting notified when I'm at or under 5 minutes of the
TimeOfDeath
time value.Take
$session.TimeOfDeath - (Get-Date)
, the TotalMinutes value is not a whole number so when it gets to 5.12324 the comparison is no longer accurate. This should be comparing timestamp to timestamp.So something like
$session.TimeOfDeath -le (Get-Date).AddMinutes(5)
should provide the expected behavior. If TimeOfDeath is still less than or equal the current timestamp.What Edition of Secret Server?
Professional
What version of Secret Server
11.0
What PowerShell host was used when producing this error
PowerShell Core (pwsh)
PowerShell Host Version
7.1.4
The text was updated successfully, but these errors were encountered: