Cannot run CMD command in Powershell 7

Hi,

I have installed Robot framework and from the CMD window I can run this command:

robot --variable username1:Test4 --variable password1:Test4 User.robot

This command succesfully do its job.

From the same path, if I try to run these commands in Powershell window:

robot --variable username1:Test4 --variable password1:Test4 User.robot

or

& “cmd.exe” /c robot --variable username1:Test4 --variable password1:Test4 User.robot

I am getting:

‘robot’ is not recognized as an internal or external command, operable program or batch file.

 

Thank you in advance!

Try putting in the full path to robot.

C:\path\to\robot.exe –variable username1:Test4 –variable password1:Test4 User.robot

or

& “cmd.exe” /c C:\path\to\robot.exe –variable username1:Test4 –variable password1:Test4 User.robot

You can also try invoke-expression. Hope this helps.