Get the date modified to be formatted with AM/PM with powershell

Use the DateTime objects formatting. More info here

$GAIBC = Get-Item "C:\Users\nosho\Documents\Paradox Interactive\Stellaris\mod\gaibc\common\districts\02_rural_districts.txt" | Foreach {$_.LastWriteTime.ToString("MM/dd/yyyy hh:mm:ss tt")}

Much simpler to just use (Get-Date -Format 'M/d/yyyy h:mm tt')