cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
swagath
New Member

Calling PowerShell from PowerApps

We need to implement a workflow that should allow users to enter details in Power App and once the user clicks on the Submit button, PowerShell script should be called. We implemented business logic inside the PowerShell. 

 

Question is, can we call PowerShell script from the PowerApps. Please help on this topic and please share if there are any examples of this scenario

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi@swagath,

Based on the issue that you mentioned, do you want to run PowerShell script directly from PowerApps?

If my understanding is correct, I am afraid that there is no way to achieve this within PowerApps currently. Here is a similar idea you can vote for:https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Interface-to-PowerShell/idi-p/57524

As we know, there is no available connector for PowerShell to be used in either Flow or PowerApps. There is no way to run PowerShell command in PowerApps.

As an alternative solution, you could create a custom connector to call the PowerShell command. You can check this for details.

In addition, Flow could help you upload the script by triggering the flow and run it. You can check this blog for details:

https://sergeluca.wordpress.com/2017/12/01/upload-and-run-a-remote-powershell-script-from-microsoft-...

More details about the PowerShell, you can check the following articles:

https://powerapps.microsoft.com/en-us/blog/powershell-scripts-to-discover-powerapps-and-flows-with-s...

https://docs.microsoft.com/en-us/power-platform/admin/powerapps-powershell

A friendly reminder that you can add the right tags to your case in order to attract more users to help you.

Best Regards,

Qi

Best Regards,
Qi

View solution in original post

2 REPLIES 2
mdevaney
Super User III
Super User III

@swagath 

Here’s an example of how to call a PowerShell command from Flow using an Azure function

 

http://johnliu.net/blog/2018/4/run-any-pnp-powershell-in-one-azurefunction-from-microsoft-flow

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

v-qiaqi-msft
Community Support
Community Support

Hi@swagath,

Based on the issue that you mentioned, do you want to run PowerShell script directly from PowerApps?

If my understanding is correct, I am afraid that there is no way to achieve this within PowerApps currently. Here is a similar idea you can vote for:https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Interface-to-PowerShell/idi-p/57524

As we know, there is no available connector for PowerShell to be used in either Flow or PowerApps. There is no way to run PowerShell command in PowerApps.

As an alternative solution, you could create a custom connector to call the PowerShell command. You can check this for details.

In addition, Flow could help you upload the script by triggering the flow and run it. You can check this blog for details:

https://sergeluca.wordpress.com/2017/12/01/upload-and-run-a-remote-powershell-script-from-microsoft-...

More details about the PowerShell, you can check the following articles:

https://powerapps.microsoft.com/en-us/blog/powershell-scripts-to-discover-powerapps-and-flows-with-s...

https://docs.microsoft.com/en-us/power-platform/admin/powerapps-powershell

A friendly reminder that you can add the right tags to your case in order to attract more users to help you.

Best Regards,

Qi

Best Regards,
Qi

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,204)