PowerShell: How to use Do-While, Do-Until Loops?

As a PowerShell user, you may be familiar with the concept of loops. They are an essential component of scripting and automation tasks in PowerShell. The Do-While and Do-Until loops are used when you want to perform an action at least once and then repeat it based on a certain condition. In…

Read more

How to use the Measure-Object cmdlet in PowerShell?

The Measure-Object cmdlet in PowerShell allows you to measure the properties of objects easily and calculate statistics. It can measure objects to calculate the minimum, maximum, sum, average, and more for property values. Measure-Object is useful for analyzing datasets, calculating numbers from object collections, and generating reports. In this article, we will…

Read more

Bulk Add Users to Microsoft Teams using PowerShell

Requirement: Bulk add users to Microsoft Teams from a CSV file. How to Add Multiple Users to Microsoft Teams in Bulk? Microsoft Teams offers a great way to communicate with colleagues and collaborators. You can easily add users to your team manually, one at a time, through the Teams app, but what…

Read more

Fix “Connect-PnPOnline : AADSTS65001: The user or administrator has not consented to use the application with ID ‘31359c7f-bd7e-475c-86db-fdb8c937548e’ named ‘PnP Management Shell’. Send an interactive authorization request for this user and resource.”

Problem: When trying to connect to SharePoint Online using PnP PowerShell user name and password, I got this error message: Connect-PnPOnline : AADSTS65001: The user or administrator has not consented to use the application with ID ‘31359c7f-bd7e-475c-86db-fdb8c937548e’ named ‘PnP Management Shell’. Send an interactive authorization request for this user and resource. Solution:…

Read more

SharePoint Online: How to Enable Tree View?

Requirement: Enable the Tree view in SharePoint Online. How to Enable Tree View in SharePoint Online? SharePoint Online is a flexible and user-friendly platform that helps you collaborate with colleagues, store documents, and share information. The Tree View is used in the Quick Launch area to list all sub-sites, libraries, and lists…

Read more

Fix for “Connect-PnPOnline: A parameter cannot be found that matches parameter name ‘interactive'” Error!

Problem: Getting “Connect-PnPOnline: A parameter cannot be found that matches parameter name ‘interactive’” error when tying to connect to SharePoint Online site from PnP PowerShell. Solution: If you get “Connect-PnPOnline : A parameter cannot be found that matches parameter name ‘Interactive’.”, that means you are not running the latest PnP PowerShell module….

Read more

How to Copy a List in SharePoint Online?

Requirement: Copy a List in SharePoint Online. How to Copy a SharePoint Online List? If you’re working in SharePoint Online, there may be times when you need to duplicate a list. Maybe you want to make a copy of an existing list for testing purposes, or perhaps you need to create multiple…

Read more

PowerShell: How to Remove Characters from a String?

String manipulation is an integral part of PowerShell scripting. When working with string data in PowerShell, you may need to remove certain characters like spaces, newlines, brackets, or even entire substrings from a string. PowerShell provides a wide range of techniques to efficiently delete characters from strings. These include removing characters from…

Read more