The Setup: Installing the Power Platform Modules
Before you can start writing scripts to manage your environments in bulk, you need to teach your computer how to talk to the Power Platform.
This is done by installing specific PowerShell Modules. Think of these like “language packs” that add new commands to your terminal, specifically designed for Dataverse, PowerApps, and Power Automate.
Here is the no-nonsense guide to getting set up in under 5 minutes.
Prerequisite Checklist
Before we type a single command, let’s make sure your machine is ready. You don’t need a supercomputer, just the basics:
- A Windows PC: (Sorry, Mac and Linux users, while PowerShell Core exists, these specific modules work best on Windows for now).
- Administrator Rights: You need permission to install new software on your machine.
- PowerShell 5.1 or higher: This comes standard on Windows 10 and 11. You’re likely good to go.
The “Big Two” Modules
There isn’t just one single module. As a Power Platform Engineer, you’ll primarily rely on two main sets of commands. We will install both to cover all our bases.
- The PowerApps Administration Module: This is for tenant-level tasks. Think of it for things like creating environments, managing user licenses, and listing all apps across the entire company.
- The Power Platform (Dataverse) Module: This is for working with data inside an environment. Think of it for things like importing/exporting solutions, querying rows in a table, or managing security roles.
The Installation Guide (Step-by-Step)
1. Run PowerShell as Administrator
- Hit the Windows Key and type “PowerShell”.
- Right-click on “Windows PowerShell” and select Run as administrator. (Click “Yes” on the security pop-up).
- You’ll see a blue terminal window open with a blinking cursor. This is your cockpit.
2. Set the Installation Policy
By default, PowerShell is cautious about downloading scripts from the internet. We need to tell it that Microsoft’s official repository (the “PSGallery”) is a trusted source.
Copy and paste this command into the terminal and hit Enter:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
If it asks for confirmation, type Y and hit Enter.
3. Install the PowerApps Admin Module
Now, let’s get the admin tools.
Run this command:
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Force -AllowClobber
-Forcetells it to just do it without asking too many questions.-AllowClobbertells it to overwrite any older, conflicting versions you might have accidentally installed.- You may see some text flash by about downloading “provider”. Type
Yand hit Enter to accept.
4. Install the Power Platform (Dataverse) Module
Next, let’s get the Dataverse tools. Run this command:
Install-Module -Name Microsoft.Xrm.Data.PowerShell -Force -AllowClobber
Verification: Did it work?
Let’s run a quick test to make sure everything is installed correctly. We’ll ask PowerShell to list all the commands it now knows related to “PowerApps”.
Run this command:
Get-Command -Module PowerApps
If you see a long list of commands scroll by, like Get-AdminPowerApp, New-AdminPowerAppEnvironment, etc., Congratulations! You have successfully installed the modules.
Summary
You’ve just taken the first step from being a Power Platform “User” to a Power Platform “Engineer.” Your machine is now ready to accept complex, automated instructions. In the next post, we’ll run your very first script to pull data out of your tenant.