Disclaimer: I do not accept responsibility for any issues arising from scripts being run without adequate understanding. It is the user's responsibility to review and assess any code before execution. More information

PowerShell : What the date x hours/days ahead or behind?

 If you want to work out that date a specified number of  unit in the future or past try this:

Add 5 hours : (Get-Date).AddHours(5)

Add 5 days: (Get-Date).adddays(5)

Minus 5 hours: (Get-Date).AddHours(-5)

Minus 5 days: (Get-Date).AddDays(-5)

Previous Post Next Post

نموذج الاتصال