Hi,
I was trying to run below query on Alteryx to unzip a file
'Expand-Archive -Path '+"'"+[FileName]+"'"+' -DestinationPath '+"'"+[User.Path]+"\'"
translated to
Expand-Archive -Path 'Networkpath\Zipped\Data.zip' -DestinationPath 'Networkpath\data\'
This works if open Powershell in the path where zip file is located and run the code. But when I try to run with Alteryx with below configuration, its throwing error and just opens Powershell as below. I feel its not pointing to correct folder as when I do the same manually. Could someone help me to fix the configuration?
Solved! Go to Solution.
You need to have test.ps1 in the Command Arguments section, as that tells Alteryx where the script is to run - there is a KB article here on the basics - https://knowledge.alteryx.com/index/s/article/How-To-Use-PowerShell-with-Alteryx-1583460190246
I believe your Run Command configuration is incorrect.
This is an example on how it can be configured:
Command should point to your powershell exe. Cammand Args should point to your script + arguments if you are providing any
I hope it helps!
Hi, Thanks for the tip @MinhLO and @davidskaife
I tried the method as suggested, but still getting error. Added the configuration setup below
@Jaimon_office
You might need to bypass the policy which prevents scripts from running.
This is how I setup my runcommand tool to run a script I write to my temp drive.
The relevant bits are:
Hope that helps
Ollie