I have a powershell script that downloads a file from an RESTApi, which works fine outside of a runbook. It downloads the file to c:\temp on my local machine. When I run the runbook, it has an issue with the path c:\temp. I need the files on a drive so I can place them on an FTP server, which I also want to incorporate into the runbook. How does one access storage in the runbook? I saw an article about $env:TEMP , but don't know how to incorporate that into the powershell script.
Have tried the variable $env:TEMP in powershell script but it is not working.
Running ls
and pwd
in a test runbook shows that it is running in the folder C:\app
Do you have to use C:\Temp
? Could you not just place your files in the running directory by using .\
? I was able to create a file in that directory in my test script.