PowerShell

Read articles and blog posts about PowerShell on Practical365.com.

Latest Articles

Use PnP PowerShell to Find SharePoint Document Libraries with Default Sensitivity Labels

I usually reach for the Microsoft Graph PowerShell SDK when I need to automate Microsoft 365 processes. But sometimes, the Graph doesn't work. PnP PowerShell is a great tool for interacting with SharePoint Online, in this instance to check document libraries to find how many have a default sensitivity label configured. The code works, it's reasonably quick, and it's an example of how flexible PowerShell can be in dealing with Microsoft 365.

May 19, 2025

Practical Graph: Figuring Out Inactive Teams Isn’t That Easy

Some people say that the Teams usage report (available in the Microsoft 365 admin center) is a great way of finding inactive teams. I consider that viewpoint to be rubbish because the Teams usage report doesn't include all the kinds of activities that a team might host. This article explains how to use audit data to supplement the usage report and create a better view of inactive teams.

March 31, 2025

Practical Graph: Reporting the Status of Group-Based License Assignments

This article describes how to create a report about group-based licensing assignments and any errors that might have occurred. The code uses the Microsoft Graph PowerShell SDK to fetch information about the groups used for licensing assignments, interpret the assignments, find users with assignment errors, and send email to inform administrators about what's been found.

March 12, 2025