Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Use Workflow Credentials within a command line (CMD) argument

klturi421
7 - Meteor

I have a workflow that is required to run command line arguments and also requires the user of a username and password. The best way that I currently run it is copy and paste a command line code into CMD prompt which has the username and password baked in. For security reasons this is clearly not the best approach. However, I would like to have a workflow run the prompt unattended and on a schedule. With that said, I do not want to hard code the username and password within the workflow.

 

 

Example command line: 

 

"\\server\Book\fax" srcuser="klturi421" srcDomain="nlsn" srcpw="somepassword" destserver="server2" destuser="klturi421" destpw="somepassword" debug="False" simulate_write="False"

 

 

What I am trying to figure out is how to use the Set Credentials within the command line. Is this possible?

1 REPLY 1
DavidP
17 - Castor
17 - Castor

Hi @klturi421 

 

Here's an example of how you can parameterize the credentials within the command line statement. You can then use the Run Command tool to execute the statement.

 

Pay special attention to the use of single and double quotes in the formula tool.

 

As for your question about not hardcoding the credentials - you can turn this into an app where the user needs to input their credentials and then execute, but that doesn't allow for scheduling.

 

Perhaps you can talk me through how you'd like it to work.

 

 

DavidP_0-1658135714449.png