Hi ItsBhatti
Many thanks for your reply, there are something worth mentioning:
1. I have reviewed the solution you have mentioned in the discussion, and this solution is for onprem PowerShell usage, not for Azure Functions. Please note that Azure Functions don't allow popup window for authentication, but executing: Connect-AzAccount will bring up the popups, and you will end up getting the error message.
2. We will have a PowerShell option when you are trying to create a new Azure Function App. Simply use this and you don't need to install other things. This may require if you are running PowerShell in a VM, but not on Azure Functions.
3. The post doesn't cover how to setup the SFTP itself, we would assume you have already setup the SFTP server. Please have the research if you haven't prepared the SFTP server, and there are lots of articles talking about how to setup the SFTP server. The #2 step mentioned WinSCP is also an option to establish the SFTP server.
Hope the info above could be helpful, thank you.