cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ashlega
Level: Powered On

Creating a new environment with PowerShell

Hi,

  when trying to use New-AdminPowerAppEnvironment, I am getting an error:

 

New-AdminPowerAppEnvironment -DisplayName AutomatedTest -EnvironmentSku Trial -LocationName canada

 

Code : BadRequest
Description : Bad Request
Error :
Errors :
Internal : System.Net.HttpWebResponse

 

 

The same error happens with or without a call to Add-PowerAppsAccount:

 

$pass = ConvertTo-SecureString "<PASSWORD HERE>" -AsPlainText -Force
Add-PowerAppsAccount -Username <USER HERE> -Password $pass

 

Other cmdlets seem to be working. For example, I can use Get-AdminPowerAppEnvironmentLocations without any problems.

 

Thanks,

Alex

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Creating a new environment with PowerShell

Are you working with a Trial license?  Although the Trial license is a P2 license you can't create additional environments if you are using a Trial account.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: Creating a new environment with PowerShell

Are you working with a Trial license?  Although the Trial license is a P2 license you can't create additional environments if you are using a Trial account.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

ashlega
Level: Powered On

Re: Creating a new environment with PowerShell

Yes, figured it out at some point.. turned out we can use -Verbose switch now to get those additional error details... will mark the answer

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (5,054)