$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)

$FIRSTDAYOFTHEMONTH
$LASTDAYOFTHEMONTH
$LASTDAYOFLASTMONTH

$CURRENTMONTH = GET-DATE -Format “MMyyyy”
$CURRENTMONTH