PowerTip: Use PowerShell to Show How Many Days Until the End of the Year
Summary: Learn how to use the New-TimeSpan cmdlet to see the number of days until the end of the year.
How can I use Windows PowerShell to see the number of days until the end of the year?
Use the New-TimeSpan cmdlet. Use Get-Date for the start and the day you wish for the end. The following shows this technique by using a U.S. English cultural setting.
New-TimeSpan -Start (get-date) -End 12/31/2012