PowerShell

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

Latest Articles

Practical PowerShell: Crafting Collections

PowerShell scripting becomes far more powerful when you master collections like arrays and hash tables. In this article, we review the basics of standard collection types. Then, walk through additional useful options that leverage other object types available through the .NET Framework.

June 3, 2025

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