Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

create an environment from powerShell

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?

  • Verified answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,319 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans