How do I get ‘date-1’ formatted as mm-dd-yyyy using PowerShell?
You can use the .tostring() method with datetime format specifiers to format to whatever you need: http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx (Get-Date).AddDays(-1).ToString(‘MM-dd-yyyy’) 11-01-2013