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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / unable to run python s...
Power Automate
Unanswered

unable to run python script from powershell in unattended mode

(1) ShareShare
ReportReport
Posted on by

Hi,

 

I am trying to run a python script using Run powershell script but it is not working in unattended mode. The user does not have admin rights on the server. I am providing the python exe path, python script path and the input variable.

 

Please suggest if there is a fix to it.

I have the same question (0)
  • Deenuji_Loganathan_ Profile Picture
    6,250 Super User 2025 Season 2 on at

    @asharma1 

    Is that showing any error? Please share screenshot (hide all sensitive data) of your flow and how you are calling python script from PowerShell. 

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • asharma1 Profile Picture
    on at

    I am passing the python exe file path, script path and the input variable but it is throwing the below error:

    asharma1_0-1719852056450.png

     

    Problem while executing action 'RunPowershellScript'. Failed to run PowerShell script. 

    Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.ActionException: Failed to run PowerShell script. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
       at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
       at Microsoft.Flow.RPA.Desktop.Modules.System.Actions.SystemActions.RunPowershellScript(Variant powershellCode, Variant& scriptStandardOutput, Variant& scriptErrorOutput, Int32 timeout, Boolean failOnTimeout)
       --- End of inner exception stack trace ---
       at Microsoft.Flow.RPA.Desktop.Modules.System.Actions.RunPowershellScript.Execute(ActionContext context)
       at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

  • NathanAlvares24 Profile Picture
    1,714 Moderator on at

    Hi @asharma1 !

     

    Try this:

    NathanAlvares24_0-1719854031543.png

     

    & '%py_run%' '%python_path%' %TextAsNumberLast%

     

    I hope this helps.

  • asharma1 Profile Picture
    on at

    Hi , I tried this now but this approach is not working.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard