← All writing

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:

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.

  1. 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.
  2. 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

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

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.