cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rapothin
Frequent Visitor

[Microsoft.PowerApps.Administration.PowerShell][New-AdminPowerAppEnvironment] Wait that all out of the box solutions imported before responding to caller

Hello everyone,

Working on some automation around environment provisioning and solution import on the brand-new environment, I found that when you got an answer from your call to New-AdminPowerAppEnvironment there are still some "out of the box" solutions importing in background.

Below you will find the error message I get in my scenario when I try to import the solution:

 

Error: Cannot start the requested operation [Import] because there is another [LanguageProvision] running at this moment. Use Solution History for more details. -- The solution installation or removal failed due to the installation or removal of another solution at the same time. Please try again later.

 

Do you think it could be possible to wait the import of all the out of the box solutions before sending the response to a call to New-AdminPowerAppEnvironment?

You can find some resources regarding this issue below:

Thank you in advance for your help!

Raphael

1 ACCEPTED SOLUTION

Accepted Solutions
MrRegalius
Advocate I
Advocate I

Hi,

After looking into New-AdminPowerAppEnvironment I noticed there is a -WaitUntilFinished flag.
I haven't been able to test this out if this works.
But looking at the GitHub code you sent, I don't see you using this flag.2020-12-07 20_33_28-Window.png

I'm wondering if this solves it.

View solution in original post

2 REPLIES 2
MrRegalius
Advocate I
Advocate I

Hi,

After looking into New-AdminPowerAppEnvironment I noticed there is a -WaitUntilFinished flag.
I haven't been able to test this out if this works.
But looking at the GitHub code you sent, I don't see you using this flag.2020-12-07 20_33_28-Window.png

I'm wondering if this solves it.

Rapothin
Frequent Visitor

Hi,

 

Good idea!

I thought I tried all the combinations of parameters of the New-AdminPowerAppEnvironment cmdlet, but it seems it was not the case.


I have made some tests and indeed, add "-WaitUntilFinished 1" in the call to the cmdlet seems to work.

I will try to make more tests in the incoming days to be sure that the solution works.

 

Thank you again for your help.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Users online (1,395)