ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Running powershell query on Alteyrx

Jaimon_office
7 - Meteor

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?

 

Jaimon_office_1-1761732988828.png

 

 

Jaimon_office_0-1761732823569.png

 

4 REPLIES 4
davidskaife
14 - Magnetar

Hi @Jaimon_office 

 

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 

MinhLO
8 - Asteroid

@Jaimon_office 

I believe your Run Command configuration is incorrect.

This is an example on how it can be configured:

MinhLO_0-1761735417527.png

 

Command should point to your powershell exe. Cammand Args should point to your script + arguments if you are providing any

 

I hope it helps!

Jaimon_office
7 - Meteor

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_0-1762163957722.png

 

Untitled.png



OllieClarke
16 - Nebula
16 - Nebula

@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.
image.png

The relevant bits are:

  1. the Output (script.ps1 in the temp drive)
  2. Command (powershell)
  3. Command arguments (bypass the policy and then run the script)
  4. Working Directory (the temp drive)

Hope that helps

 

Ollie

Labels
Top Solution Authors