.NET assembly via Task Scheduler

Advertisement

shaddad
Joined:
Posts:
2
Location:
MI

.NET assembly via Task Scheduler

I have a quick question, I have a working PS1 with .NET assembly that runs just fine when I run it inside the WinSCP Automation folder but does not run in the Task scheduler, I've been trying all the different ways in the forums to run it with no luck, here are some of the attempts:

Attempt1:
"C:\Program Files (x86)\WinSCP\WinSCP.com"
/script="C:\Users\gp-mradmin\Desktop\WinSCP-6.1.2-Automation\TTSI_SFTP_1.ps1"
Attempt2:
C:\Users\gp-mradmin\Desktop\WinSCP-6.1.2-Automation\TTSI_SFTP_1.ps1
Attempt3:
"C:\Users\gp-mradmin\Desktop\WinSCP-6.1.2-Automation\WinSCP.exe"
/script="C:\Users\gp-mradmin\Desktop\WinSCP-6.1.2-Automation\TTSI_SFTP_1.ps1"
All failing with the same error code:
2147942401

Could you please help me with the Program/Script and Arguments for this please?

Location Variable: C:\Users\gp-mradmin\Desktop\WinSCP-6.1.2-Automation
PS: TTSI_SFTP_1.ps1

Reply with quote E-mail

Advertisement

shaddad

You sir, are the man. This made a lot of sense after reading. I put the DLL, exe, and script inside the System32 folder, added powershell.exe / -File "File name" and it ran beautifully from the Task Scheduler. I was a little too deep and step back to think about this. Thank you!!

Reply with quote E-mail

Advertisement

You can post new topics in this forum