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 / 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.

  • CU16071609-1 Profile Picture
    6,255 Moderator 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 259 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 227 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 134 Super User 2026 Season 2

Last 30 days Overall leaderboard