I like to add date (yyyy_MM_dd) behind output file , after adding $startTime variable , it's not working . Seems file format is not correct . Could you tell me where is wrong ?
$startTime = Get-Date -UFormat "%YYYY _ %mm _%dd"
bcp DB_AA.dbo.tbl_AA_Export_Table out ("\\server1\IncomingFile\folder1\DB1\DB_AA_Daily_Output_"+ $startTime + ".txt") -T -c