$ts = get-date -Format "yyyy.MM.dd.HH:mm.ss"; $ts = $ts -replace ":", "."; set-variable -Name "BuildTimeStamp" -Value $ts -scope Global;