Convert Powershell Script To Azure Functions