@tamilk Thanks for reaching out. I understand that you are trying to list all of your processes in a text file. When you execute the PowerShell script in your local environment, it uses the local disk to store your file. However, for runbooks, if you need to create temporary files as part of your runbook logic, you can use the Temp folder (that is, $env:TEMP) in the Azure sandbox for runbooks running in Azure. The only limitation is you cannot use more than 1 GB of disk space, which is the quota for each sandbox.
With the hybrid sandbox, you can use C:\temp based on the availability of storage on a Hybrid Runbook Worker. However, per Azure VM recommendations, you should not use the temporary disk on Windows or Linux for data that needs to be persisted.