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

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,134)