cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
drake
Advocate II
Advocate 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 Sage
Solution Sage

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 Sage
Solution Sage

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
Advocate II
Advocate 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 Sage
Solution Sage

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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Top Kudoed Authors
Users online (3,204)