hoe to configure run command tool to execute following powershell script
" Get-ChildItem -Path "C:\" -Recurse | Select-Object FullName,
@{Name="Size (Bytes)";Expression={$_.Length}},
CreationTime,
LastWriteTime |
Export-Csv -Path C:\downloads\DriveContent9.txt -NoTypeInformation
"
your small help means a lot to me
@curator_at_workyou have two issues.
1) your error message says that if you want to add a tool after your run command (ie your browse tool) -> you have to include an input file. Think about this. you cannot browse nothing. so if you want to browse something you have to include an input tool. Drop the browse because it is it not relevant for your situation. Powershell returning a message 1 says there's a syntax issue with your powershell command as Alteryx executes it. you need to troubleshoot this --> see 2)
2) change the format of your output data from a .txt file to a .ps1 -> change the encoding to utf-8. see the file you are creating.
3) run this file in your command prompt via powershell -> does it work? is it triggering some interactive component?
4) if 3) works and there is nothing you are flagging but it's still not working in Alteryx confirm that you are running both powershell in command prompt and powershell in alteryx as the same user.
Hi, @curator_at_work
1- When there is an outgoing connection this tool requires an input file to be configured.
You didn't mention needing an output file for downstream processes in your request for help, so the Browse tool is redundant and causing the error. Please simply remove the Browse tool.
2- The external program "PowerShell.exe" returned an error code: 1
While you believe you've replicated my settings, you haven't correctly populated the dialog's parameters. You've simply pasted your script content into the "Command Arguments [Optional]:" field, which is incorrect (syntax error). Please carefully review the variable syntax in my previous instructions. If you're unfamiliar with PowerShell syntax, first replicate the workflow exactly as shown in my screenshot and settings. Once successful, you can then adapt and modify it to your specific needs.