web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / CMD 'Please enter' fol...
Power Automate
Answered

CMD 'Please enter' follow up commands

(2) ShareShare
ReportReport
Posted on by 14
Hello -
 
I'm attempting to use CMD to generate an SSH key using the command ssh-keygen. If you don't specify all of the parameters, CMD will prompt you to enter in that information.
 
For example, if I simply type in 'ssh-keygen' into command, I'll be asked: 
 
'Enter file in which to save the key'
 
If I use the read from CMD prompt, it will not show this text. How do we handle this in PAD? Can PAD handle this?
 
Thank you. 
  • Verified answer
    harish_sada Profile Picture
    53 on at
     
     
     
     
     

    Copy and paste the code below into PAD
     
    System.RunApplication.RunApplication ApplicationPath: $'''C:\\Windows\\system32\\cmd.exe''' WorkingDirectory: $'''C:\\Users\\''' WindowStyle: System.ProcessWindowStyle.Normal ProcessId=> AppProcessId
    WAIT 5
    UIAutomation.GetWindow.GetForegroundWindow WindowTitle=> WindowTitle WindowInstance=> AutomationWindow
    WAIT 5
    MouseAndKeyboard.SendKeys.FocusAndSendKeys TextToSend: $'''ssh-keygen {Enter}''' DelayBetweenKeystrokes: 30 SendTextAsHardwareKeys: False
    WAIT 10
    MouseAndKeyboard.SendKeys.FocusAndSendKeys TextToSend: $'''key3 {Return}''' DelayBetweenKeystrokes: 30 SendTextAsHardwareKeys: False
    WAIT 10
    MouseAndKeyboard.SendKeys.FocusAndSendKeys TextToSend: $''' {Return} {Return}''' DelayBetweenKeystrokes: 30 SendTextAsHardwareKeys: False
    WAIT 2
    MouseAndKeyboard.SendKeys.FocusAndSendKeys TextToSend: $'''exit{Enter}''' DelayBetweenKeystrokes: 30 SendTextAsHardwareKeys: False
    Folder.GetFiles Folder: $'''C:\\Users\\''' FileFilter: $'''*.pub''' IncludeSubfolders: False FailOnAccessDenied: True SortBy1: Folder.SortBy.NoSort SortDescending1: False SortBy2: Folder.SortBy.NoSort SortDescending2: False SortBy3: Folder.SortBy.NoSort SortDescending3: False Files=> Files
    SET NewVar2 TO Files[0]['FullName']
    File.ReadTextFromFile.ReadTextAsList File: NewVar2 Encoding: File.TextFileEncoding.DefaultEncoding Contents=> Key
    MouseAndKeyboard.SendKeys.FocusAndSendKeys TextToSend: $''' {Return} {Return}''' DelayBetweenKeystrokes: 30 SendTextAsHardwareKeys: False

     
     
     
  • deimospwns Profile Picture
    14 on at
    thank you for the reply, harish!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 231 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 217 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 170

Last 30 days Overall leaderboard