Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Using the Run Command - PowerShell Error

Sean_Beattie
5 - Atom

Hello!

 

I am attempting to create an Alteryx workflow that ingests data, transforms it, then parses it out as zip folders along with a set of copied files per folder created (dynamically).

 

Currently (using a combination of the run command, bat files, and the output tool) am able to create these folders dynamically, parse the rows as individual files, then zip them. However, I am running into an issue getting the powershell portion to work. After the folders are created but before they are zipped, I wrote a Powershell script that simply finds each child folder in the output directory and copies 6 files to each existing folder. Here is a quick snap of how it fits in my workflow:

Sean_Beattie_0-1642191356648.png

Sean_Beattie_3-1642191662779.png

 

Sean_Beattie_2-1642191443450.png

 

Some context: copyFilestoEach.ps1 is the script that actually performs the copy/move operations. psExecute.ps1 is just a dummy script file that I write a text string to because the run command required me to have an output connection and I didn't wish to modify the actual script.

 

I keep receiving this error 5, access is denied. I looked through quite a few forum posts but didn't seem to find one pertaining spe I tried changing from a non-admin to Admin (in elevated session) with no luck. Any idea what could be causing this and is there a resolution? I am banging my head trying to figure this out. I am using explicit pathing as practice for when I publish to the server and replace C:\ with \\

 

Any insight would be appreciated

 

1 REPLY 1
Treyson
13 - Pulsar
13 - Pulsar

Hello @Sean_Beattie,

 

Here is an older thread about running powershell from Alteryx. This was written by the great and powerful @Ozzie whom we are fortunate to still have around. The part that stands out to me is at the beginning where it says you need to have "scripting enabled". If that doesn't work, maybe we can wrangle Ozymandias in and figure it out.

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/How-To-Use-PowerShell-with-Alteryx/...

Treyson Marks
Senior Analytics Engineer
Labels