$CURRENTDATE=GET-DATE -Format “MM/dd/yyyy”
$FIRSTDAYOFTHEMONTH = GET-DATE $CURRENTDATE -Day 1
$LASTDAYOFTHEMONTH = GET-DATE $FIRSTDAYOFTHEMONTH.AddMonths(1).AddSeconds(-1)
$LASTDAYOFLASTMONTH = GET-DATE $FIRSTDAYOFTHEMONTH.AddMonths(0).AddSeconds(-1)
$CURRENTMONTH = GET-DATE -Format “MMyyyy”
This entry was posted by admin on August 3, 2017 at 8:46 am, and is filed under Powershell. Follow any responses to this post through RSS 2.0.
You can leave a response or trackback from your own site.
Your email address will not be published. Required fields are marked *