cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
drake
Helper II
Helper II

How to "Make instance visible" for Powershell and CMD?

The Launch Excel action includes a "Make instance visible" option:

 

drake_0-1623072942319.png

 

 

The Run Powershell script and Open CMD session actions do not include this option, however.  This makes it difficult to debug CMD and Powershell sessions (can't see the commands running, etc.)  Is there some workaround available to make working with CMD and Powershell sessions easier?  Or is a "Make Instance visible" option planned for a future release?  Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
yasunm02
Solution Supplier
Solution Supplier

Couldn't find a command to directly capture text from cmd window.

Best way to get the text is use 'Send keys' actions for 'Select All' shortcut (I work in a non-english Windows, so here the shortcut is Ctrl+A) and then shortcut for 'Copy' (here is Enter). You can find the correct shortcuts in CMD window: right-click top of window and then Edit.

After that, use 'Get Clipboard Text' action under Clipboard group to get the text and work with it.

If this solved your problem, please mark this post as solution 😉

View solution in original post

3 REPLIES 3
yasunm02
Solution Supplier
Solution Supplier

You can try 'Run Application' action under System group. In parameters, application path, use 'C:\Windows\System32\cmd.exe' (usual path). You can also choose a maximized window in 'Window style' option. 

drake
Helper II
Helper II

Thanks @yasunm02 that gets us half way there (writing data to the window). 

 

I wonder if there is a way in Power Automate Desktop to read from the window too?

yasunm02
Solution Supplier
Solution Supplier

Couldn't find a command to directly capture text from cmd window.

Best way to get the text is use 'Send keys' actions for 'Select All' shortcut (I work in a non-english Windows, so here the shortcut is Ctrl+A) and then shortcut for 'Copy' (here is Enter). You can find the correct shortcuts in CMD window: right-click top of window and then Edit.

After that, use 'Get Clipboard Text' action under Clipboard group to get the text and work with it.

If this solved your problem, please mark this post as solution 😉

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (2,253)