For my current script (appended below), I need to add an extra column as \'Time\' which captures the current system date and time along with the output which the script is alrea
If you specify date format as: dd/MM/yyyy
, slash will be recognized as date separator and replaced by date separator from your current culture settings. In my case it would return 06-04-2020
To circumvent this behaviour, escape the separators. Add this to hashtable you use for generating other properties:
Time = (get-date -Format 'dd\/MM\/yyyy hh:mm')