Running robot by UiPath API

Hello everyone,

I’m trying to get robot license and run robot by UiPath API. I met a problem when I use the following powershell code:$res = Execute-Command -commandTitle ‘Execute’ -commandPath $robotPath -commandArguments ‘execute --process “XXXXXX”’. The error info is -

Execute-Command : The term ‘Execute-Command’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At D:\Work2022\Development\RPA\Start FI RPA.ps1:206 char:8

  • $res = Execute-Command -commandTitle ‘Execute’ -commandPath $robotPat …
  •    ~~~~~~~~~~~~~~~
    • CategoryInfo : ObjectNotFound: (Execute-Command:String) , CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

Does anybody know how solve this problem?

Thank you in advance!