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

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Event ID 64,77,1008 Certificates Events Windows Server 2008, 2008R2