cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
joaofuzinelli
Frequent Visitor

Problems with write CMD - Power Automate Desktop

Hi. 

I have created a power automate to run a command on a CMD and write on a blank Excel.

 

When i see the results it's look like that sometimes de Write CMD does not "press enter" on a command and saves the command like this

nslookup -type=mx xyz.com and doesn't have the results of command.

 

Anyone have an idea?

1 ACCEPTED SOLUTION

Accepted Solutions
JamesP_MSFT
Microsoft
Microsoft

Hi @joaofuzinelli

Could you please provide some more info?

Conceptually, the logic in the flow should look like this:

JamesP_MSFT_0-1604001334871.png

 

right?
You create a CMD session, pass it a command and then retrieve the output of that command and save in an Excel worksheet.
Also, from what I understand the issue you are facing is not constant, it happens randomly. 

Try utilizing a Wait action after the execution of Write to CMD session. 
You could utilize the Wait for text on CMD if you know that an exact output will be available at every execution or use a simple Wait action a set a small delay in seconds.

Best regards,
James

View solution in original post

2 REPLIES 2
JamesP_MSFT
Microsoft
Microsoft

Hi @joaofuzinelli

Could you please provide some more info?

Conceptually, the logic in the flow should look like this:

JamesP_MSFT_0-1604001334871.png

 

right?
You create a CMD session, pass it a command and then retrieve the output of that command and save in an Excel worksheet.
Also, from what I understand the issue you are facing is not constant, it happens randomly. 

Try utilizing a Wait action after the execution of Write to CMD session. 
You could utilize the Wait for text on CMD if you know that an exact output will be available at every execution or use a simple Wait action a set a small delay in seconds.

Best regards,
James

Hi James.

 

The problem was the wait between the Write on CMD and Read from CMD.

 

That's working fine now.

 

Thanks a lot!

Helpful resources

Users online (3,666)