how to how which line a powershell job is running?


i have powershell job running inside sql agent. when run powershell script manually on command line, it's fast, when run inside sql agent, hung long time, , don't know script hanging, there way know line powershell script running

the way typically debugging of script write out file... simple slapping time , line number or give , idea of how long each part takes

add-content $log "$(get-date): start of script"
add-content $log "$(get-date): processing xyz"

etc etc



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

difference between wuauclt1.exe and wuauclt.exe

Windows 2016 RDS event 1306 Connection Broker Client failed to redirect the user... Error: NULL