我的windows服务器上有一个powershell脚本运行一个SSIS包,它使用一个xml配置输出到一个日志文件。
有时,当我运行这个脚本时,日志文件的输出似乎没有正确地写入日志,而且在编写过程中,powershell脚本似乎在日志的每个字符之间插入了空格。
有人知道为什么会发生这种行为吗?
我的Powershell脚本:
dtexec /f "D:/Batch Jobs/ThisJob/ThisJob.dtsx" /conf "D:\Batch Jobs\ThisJob\ThisJob.dtsconfig." >> "D:/Batch Jobs/ThisJob/ThisJob_executionlog.txt"
正常输出示例:
Microsoft (R) SQL Server为64位版权(C) Microsoft公司执行软件包实用程序版本12.0.4100.1 .版权所有。 开始时间: 11:42:19进度: 2016-05-26 11:42:19.53资料来源: AM_AGENT验证: 0%完成
powershell输出示例,其中满是空格:
F(R),S,q,L,S,e,r,e,p,a,c,k,a,g,e,u,l,y,e,e,r,i,n,2。0。4 1 01 F,r,6,4-b,c,p,y,r,h,t(C),m,c,r,r,f,c,r,t,r,t,r,r,t,r,rA,l,r,v,d。 第二天:1:5,1:1:3下午2:0 6-0 5-2 6 1:2:5 1:1 3。8 0 e:a M_A G E N T V a_1 d_n g:0%c o_m p l_e_e_d P_r_r_g_s_s:2 0 1 6-0 5-2 6 1:5:1 3。8 6 S u r c e:a M_A G E N T V a l d d n g:5 0%c o m p l e d p r o r r s s p r 0 0 e s s:2 0 1 6-0 5-2 6 1:5 1:1: 13.8 6 S_u_c_e:a_A_G_E_n_T_V a_a_1_d_d_n g:1 0%c_m_p_(P_L)_e_d P_r_g_e_s_s:2 0 1 6-0 5-2 6 1:5 *13。8 6 u_c_e:a_a
发布于 2016-05-26 20:01:17
你试过| Out-File path
而不是>>
吗?
https://stackoverflow.com/questions/37469907
复制相似问题