I am attempting to run a Powershell script but cannot get it to run. I have tried "Run Command" and "Execute Command" and it does not seem to run
For the "Run Command" I have these parameters:
Shell - Powershell
Command - d:\testing\test.ps1
For the "Execute Command" i have the parameters:
path d:\testing\test.ps1
I am using Firestarter to start the flow.
This script will delete folders.
Does anyone have ideas?. Tanks!
Running Powershell scripts
Re: Running Powershell scripts
I have no experience with the "Run Command" app. As to "Execute command" the mistake is that "Command or path" should point to powershell.exe, the path to the script is part of the "Arguments".
If you need to delete files and folders have a look at the "File Pool Cleanup" app that is part of https://www.enfocus.com/en/appstore/product/folder-apps. Perhaps that is a better fit for what you need to do?
If you need to delete files and folders have a look at the "File Pool Cleanup" app that is part of https://www.enfocus.com/en/appstore/product/folder-apps. Perhaps that is a better fit for what you need to do?
Re: Running Powershell scripts
With Execute command you can run it like this:

Edit: changed screenshot, makes more sense now 
Re: Running Powershell scripts
Thank you! this is working for me.
Re: Running Powershell scripts
I have one more question.
How do I run the script if it has arguments? I tried placing the argument in the same quotes and it didnt work. I tried separate, as bbelow, and it doesnt work either?
-nologo -windowstyle hidden -executionpolicy bypass -file "D:\Testing\Folder count\Project_folder_cleanup.ps1" -ProjectsDir 'D:\ESO_Testing\Projects'
How do I run the script if it has arguments? I tried placing the argument in the same quotes and it didnt work. I tried separate, as bbelow, and it doesnt work either?
-nologo -windowstyle hidden -executionpolicy bypass -file "D:\Testing\Folder count\Project_folder_cleanup.ps1" -ProjectsDir 'D:\ESO_Testing\Projects'
Re: Running Powershell scripts
You can use the app "Execute command friend" to create a Batch or Shellscript file that you run in Execute Command or Powerscript.
The applets you add variables from Switch in an easy way.
https://www.enfocus.com/en/appstore/pro ... and-friend
The applets you add variables from Switch in an easy way.
https://www.enfocus.com/en/appstore/pro ... and-friend
Re: Running Powershell scripts
This is my internal powershell example flow/script, it shows all the magic 

Re: Running Powershell scripts
If you wish to run a powershell script from Run Command in Powershell mode, then you have to build it in the same way as you would when starting a powershell script from another powershell script. Meaning that you have to place a "&" before the path to the script to be executed.
Code: Select all
& "C:\Path\To\script.ps1" -ArgumentName ArgumentValue