Using WinSCP within powershell script on Azure

Advertisement

Borges
Joined:
Posts:
3
Location:
Chicago

Using WinSCP within powershell script on Azure

I'm able to run a script locally with the following script referring to the dll in the same local directory as the script.


Add-Type -Path "WinSCPnet.dll"

If I want to run my script within an Azure Runbook then I need to use WinSCP from Azure. Is it accessible there? Do I need to install it on a web service and refer to that?

Thanks!

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Using WinSCP within powershell script on Azure

I was not able to use WinSCP .NET assembly in Azure Runbook.
The assembly uses WinSCP executable internally. And I was not able to use it on Runbook.
I've posted a question on Stack Overflow:
https://stackoverflow.com/q/57574899/850848

If it turns out that it's indeed not possible, note that you can use WinSCP .NET assembly in Azure Functions:
https://winscp.net/eng/docs/guide_microsoft_azure_function_sftp
And in Azure WebJobs:
https://winscp.net/eng/docs/guide_microsoft_azure_webjob_sftp

Reply with quote

Borges

To use WebJobs though you have to attach the script to an existing site. This is just a free floating powershell task that has nothing to do with any website. I wanted to automate it on Azure,

Reply with quote

Borges
Joined:
Posts:
3
Location:
Chicago

martin wrote:

But you can still use Azure Function, cannot you?

I am trying to do this entirely on the Cloud via Powershell.

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Azure Function runs on the Cloud and can be coded in PowerShell.
Or do you mean that you want to even implement it "on the Cloud" (in the Azure Portal)?

Reply with quote

Advertisement

You can post new topics in this forum