Powershell's Get-date: How to get Yesterday at 22:00 in a variable?
Posted
by icnivad
on Stack Overflow
See other posts from Stack Overflow
or by icnivad
Published on 2010-03-12T15:59:50Z
Indexed on
2010/06/02
2:23 UTC
Read the original article
Hit count: 198
powershell
For a check i need yesterday's date at 10:00pm in a variable.
I get yesterdays Date and current Time with
$a = (get-date).AddDays(-1)
But how do i manipulate the time to 22.00 and leave the variable still as Date-Object?
© Stack Overflow or respective owner