🚀 Provisioning a D365 Finance & Operations Sandbox Using PowerShell
Setting up a Dynamics 365 Finance and Operations (D365 F&O) sandbox environment can be a game-changer for developers and consultants working on enterprise-grade solutions. This guide walks you through the process of provisioning a developer-focused environment using PowerShell and the Power Platform Admin Center.
✅ Prerequisites
- Admin Access: Appropriate permissions in the Power Platform Admin Center.
- Licensing: One of the following licenses:
- Dynamics 365 Finance
- Dynamics 365 Supply Chain Management
- Dynamics 365 Project Operations
- Power Platform CLI: Installed and updated to the latest version.
- Execution Policy: Ensure PowerShell scripts are allowed to run:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned -Force
🛠 Step 1: Create the Environment
We’ll use PowerShell to provision a D365 F&O sandbox environment.
1. Install the Power Platform Admin Module
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
2. Authenticate to Power Platform
Add-PowerAppsAccount -Endpoint prod
3. Define the Provisioning Template
$jsonObject= @"
{
"PostProvisioningPackages":
[
{
"applicationUniqueName": "msdyn_FinanceAndOperationsProvisioningAppAnchor",
"parameters": "DevToolsEnabled=true|DemoDataEnabled=true"
}
]
}
"@ | ConvertFrom-Json
4. Provision the Environment
New-AdminPowerAppEnvironment -DisplayName "<<Environment Name>>" `
-EnvironmentSku Sandbox `
-Templates "D365_FinOps_Finance" `
-TemplateMetadata $jsonObject `
-LocationName "unitedstates" `
-ProvisionDatabase
Note: Replace <<Environment Name>>
with a friendly name. Use the appropriate template ID based on your license:
License | Template Name | Template ID |
---|---|---|
Dynamics 365 Finance | Finance (preview) | D365_FinOps_Finance |
Supply Chain Management | SCM (preview) | D365_FinOps_SCM |
Project Operations | Project Ops Integrated (preview) | D365_FinOps_ProjOps |
Commerce (Trial Only) | Commerce (preview) | D365_FinOps_Commerce |
⏳ Step 2: Monitor Deployment
→ Ready (usually takes ~2 hours).🔍 Step 3: Validate the Environment
- Open the Finance and Operations URL.
- Search for “Users” and open the Users form under System Administration.
- Update the Company for the Admin user to
USMF
.
🔄 Step 4: Update PowerAIExtensions Solution
- Go to your environment in the Power Platform Admin Center.
- Navigate to Resources > Dynamics 365 Apps.
- If an update is available for Microsoft Dynamics 365 – PowerAIExtensions, click Update.
No comments:
Post a Comment