Date and Time Math with PowerShell
How many times have you had to figure out what date was X days, months, or years ago, or perhaps what time was Y minutes, hours, or seconds ago? Producing a report of all the users who have not logged in during the past 90 days is a pretty common request. There’s two ways to go about doing this – the lazy way and the precise way. The lazy way is to say well 90 days is about three months ago, and it’s 11/24 today so that would be 8/24. The precise way is to realize that 90 days go … Continue reading Date and Time Math with PowerShell