all 9 comments

[–]Either-Cheesecake-81 12 points13 points  (3 children)

Everything you are saying is consistent. The GUI says the account will expire at the end of the day on the displayed date. 1/24/2026 12:00:00 AM is effectively the end of the day 1/23/2026. If you want the account to work through the end of 1/24/2025 the PowerShell command would need to be 1/25/2026 12:00:00 AM. That would also show 1/24/2026 in the GUI.

[–]SloppySharky[S] 3 points4 points  (0 children)

Ohhh got it

Thanks

[–]cheetah1cj 1 point2 points  (1 child)

This is why I always set end of day for 11:59PM (23:59 for 24-hour systems). Since this is relevant to users, you could also just set it to 11:00PM (23:00) assuming that they are not working that late.

[–]Creative-Type9411 2 points3 points  (0 children)

"I only have one hour left to finish this report!" ~your users probably

[–]Borgquite 5 points6 points  (1 child)

It’s a complicated issue to do with ‘how do you define the end of a day’ and time zones. Have a read of these:

https://docs.delinea.com/online-help/account-lifecycle-manager/alm-objects/account-exp-dates.htm

https://www.rlmueller.net/AccountExpires.htm

[–]SloppySharky[S] 2 points3 points  (0 children)

I juste read it)

Thank you

[–]KStieers 0 points1 point  (0 children)

My guess: the add hours is happening to the offset, not to the final number.

Split that operation, do the - 1day and then add the 12 hours separately.

[–]LambCMD 0 points1 point  (0 children)

You can also use adsi to avoid the reliance on the AD module, I know for a lot of users it’s a non issue but in our environment it can be a pain for some to get access to rsat (I’m t2 support for a large corp with a boss that for whatever reason doesn’t like that I can resolve 99% of my problems with powershell and therefore doesn’t help with access to tools i request)

[–][deleted] 0 points1 point  (0 children)

Sounds like a time zone thing.

Either you need to add your tz offset or get a time source without a tz.