Np. Though you should not put your own files into Windows system folders.
- martin
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!!
powershell
(PowerShell 5 and older) or pwsh
(PowerShell 6 and newer) commands. No winscp.exe
is involved.
"C:\Program Files (x86)\WinSCP\WinSCP.com"
/script="C:\Users\gp-mradmin\Desktop\WinSCP-6.1.2-Automation\TTSI_SFTP_1.ps1"
C:\Users\gp-mradmin\Desktop\WinSCP-6.1.2-Automation\TTSI_SFTP_1.ps1
"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"