Jaa


Prerequisites for making Planner changes in Windows PowerShell

This procedure walks you through downloading the files needed to run Planner admin commands in PowerShell.

If you're new to Windows PowerShell, see Getting started with Windows PowerShell.

Planner Tenant Admin PowerShell Dependencies

  1. Verify Installation: Check if the MSAL.PS module is installed by running the following command in PowerShell:
    Get-Module -ListAvailable MSAL.PS
    
  2. Install the Module: If the module is not installed, install it using:
    Install-Module -Name MSAL.PS -Scope CurrentUser 
    

Download Planner Tenant Admin PowerShell Commands

Note

You must be a global admin to run the Planner Tenant Admin Powershell Commands.

Note

By downloading this package, you agree to the enclosed license and terms.

Download the Planner Tenant Admin PowerShell file. Unzip it to a location you can access from PowerShell.

Unblock your files

You'll need to "unblock" one of the files you downloaded in the Planner Tenant Admin PowerShell package in order to use them in PowerShell. This is because by default, executing scripts downloaded from the Internet isn't allowed. The file you need to unblock is plannertenantadmin.psm1.

Do the following to unblock plannertenantadmin.psm1:

  1. In File Explorer, go to the location in which you unzipped your files.

  2. Right-click on plannertenantadmin.psm1 and select Properties.

  3. On the General tab, select Unblock.

    unblock-files.

  4. Select OK.

Load the Planner Tenant Admin PowerShell module

After unblocking your plannertenantadmin.psm1, do the following to load the Planner Tenant Admin PowerShell module:

  1. Start Windows PowerShell. In PowerShell, type the following to enable running scripts downloaded from the internet for this session only. It might prompt you to confirm by typing "Y."

    Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
    
  2. Type the following to run the PlannerTenantAdmin PowerShell script. This will import a module with all available cmdlets.

    Import-module "<location of the plannertenantadmin.psm1 file you unzipped>"
    

    For example, if your file is stored in C:\AdminScript, you would type:

    Import-module "C:\AdminScript\PlannerTenantAdmin.psm1"
    

Now you're ready to make changes to Planner at the organizational level using PowerShell.