C# App, Windows Azure VM troubleshooting (experts only)

Job ID: 33233657

Budget: $10 – $30 USD

We have an API app written in C#. The app instantiates Powershell to insert a script that calls python scripts. This process works fine in a develop environment and has worked in other Azure VMs.

1.Using test code, we can add a new file to target directory using Powershell only. This works on the target Azure VM. It also works from target Azure VM Control Panel “Run Command Script”. Here is the Powershell only script-
"some-copy" | Out-File -FilePath C:\Users\path_to_directory\powershell-output.txt


2. Here is our attempt to call Powershell -> Python from the same C# app. It does not execute on Azure VM. However, the same Powershell script does work from the target Azure VM’s Control Panel. Here is the powershell -> python only script-
cd C:\Users\path_to_directory
python .\python-output.py

Troubleshooting steps we have taken-
The python script runs fine from CMD or Powershell on the target VM
We have expanded the permissions for the target directory.
As mentioned above the Powershell -> python script works from the Azure control panel
The test API call successfully outputs a new file using Powershell alone.
We are seeing no errors in Event Viewer
API returns 200 response


You will need to troubleshoot using a screen sharing session. C# and Azure implementation experts only please.