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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (2,943)