Powershell's Get-date: How to get Yesterday at 22:00 in a variable?

前端 未结 7 1820
没有蜡笔的小新
没有蜡笔的小新 2020-12-30 19:18

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)
7条回答
提交回复
热议问题