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

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

create an environment from powerShell

(0) ShareShare
ReportReport
Posted on by

i've seen i create an D365 se environment from shell using the `New-AdminPowerAppEnvironment` command

however, going throw the documentation (https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerApps.Administration.PowerShell/new-adminpowerappenvironment?view=pa-ps-latest) i couldn't find anywhere to insert my credentials so the command won't open a popup window each time (i want to automate the process of creating environment)

i was wondering if there is a way to send the credentials to the command or store them somewhere the command will pick them from?

I have the same question (0)
  • Verified answer
    Wahaj Rashid Profile Picture
    11,321 on at
    RE: create an environment from powerShell

    Hi,

    Thank you for your query.

    You can pass credentials as following:

    $pass = ConvertTo-SecureString "password" -AsPlainText -Force
    Add-PowerAppsAccount -Username foo@bar.com -Password $pass

    Here is the original link for your reference:

    https://powerapps.microsoft.com/en-us/blog/gdpr-admin-powershell-cmdlets/

    Best,

    Wahaj

    (if it helps, please mark it as verified)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
DAnny3211 Profile Picture

DAnny3211 262

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 137 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 85 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans