I'd like to be able to send the output of one step into a PowerShell script and make the returned object (and its key/value pairs) available to the next step.
You can also do this without Azure - Check out this blog on local code execution using Microsoft Flow and the on-premises Data gateway:
I literally tried this using File System method for running power shell but was not successful. I have working connection to my file system using data gatway. But when I use it just append or even create a file, I get an error which says
message": "The requested action could not be completed. Check your request parameters to make sure the path '\\\\ServerName\\FolderName\/AuditLogExtract.txt' exists on your file system.
What also see strange to me is that flow adds extra slashes in the path for some reason.
I have also ensured to add my user into a local admin user group in the server where the file is located. I have shared that file to my user explictly. But no luck.
I need to fire a powershell script after a file is dropped into a onedrive folder