To automate windows command sessions we use cmd actions in power automate desktop. These actions are useful to execute any files, write files, and close files.

List Variable in Power Automate Desktop



Wait in Power Automate Desktop
This action is used to open a new CMD session.
From the Actions panel, drag and drop the Open CMD session actions into the workspace. Add the Working folder path in which you want to open your command. The output will be produced in the CmdSession variable. Click on Save.
This action is used to read the output of a CMD session.
From the Actions panel, drag and drop the Read from CMD session actions into the workspace. Add the variable from the CMD session action. The output will be stored in the CmdOutput variable. Click on Save.
This action is used to execute a command on an open CMD session.
From the Actions panel, drag and drop the Write to CMD session actions into the workspace. Add the variable from the CMD session action. Add command to open a text file note.txt. Enable send enter after every command. Click on Save.
Mouse and Keyboard in Power Automate Desktop
This action is used to wait for a specific text on a previously opened CMD session.
From the Actions panel, drag and drop the Wait for text on CMD session actions into the workspace. Add the variable from the CMD session action. Add text to wait as note.txt. Click on Save.
This action is used to close a previously opened CMD session.
From the Actions panel, drag and drop the Close CMD session actions into the workspace. Add the variable from the CMD session action. Click on Save.


I am Sharvari Raut, having sound knowledge and experience in technical writing. Currently, pursuing my B.Tech in Computer Science and Engineering.