Fix “Get-SPWeb : The term ‘Get-SPWeb’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.” Error in PowerShell

Problem: When trying to run a SharePoint PowerShell script, I got the below error: Get-SPWeb : The term ‘Get-SPWeb’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct…

Read more

Fix “A compliance policy is currently blocking this site deletion” Error in SharePoint Online

Problem: When trying to delete a SharePoint Online site collection, I get an error message: “Can’t Delete Site: A compliance policy is currently blocking this site deletion.” Furthermore, in the SharePoint Admin center, we get an intimation saying, “This site has a compliance policy set to block deletion.”  Root Cause: This is…

Read more

How to Send Emails in PowerShell using Send-MailMessage?

Email is an essential communication tool used in most organizations. As a system administrator, you may need to send emails directly from PowerShell scripts to automate notifications or reports. With PowerShell, you can send emails from command-line scripts, automate email notifications, and even integrate email functionality into your larger automation workflows. This…

Read more

Find All InfoPath Form Libraries in SharePoint Online using PowerShell

Requirement: Find All InfoPath Form libraries in SharePoint Online. How to Find All InfoPath Form Libraries in SharePoint Online Site? In SharePoint Online, InfoPath forms can be stored in form libraries, which are special types of document libraries that are designed to store and manage InfoPath forms. If you need to find…

Read more

PowerShell Escape Characters: All You Need to Know!

In PowerShell, like many scripting languages, there is a set of escape characters that you can use within strings to represent certain characters that have a special meaning. Escape characters are special characters that are used to represent non-printable or reserved characters within strings. These characters are essential for handling special situations…

Read more

How to Compare Dates in PowerShell: A Step-by-Step Tutorial

Comparing dates is a common task that you may often need to do when working with PowerShell. There are several ways to compare dates and times in PowerShell, and understanding the different techniques can help ensure you use the right approach for your specific needs. In this article, we will explore the…

Read more

SharePoint Online: Get Subsite Permission Report using PowerShell

Requirement: PowerShell script to get subsite permissions in SharePoint Online. How to Get Subsite Permissions in SharePoint Online? Do you need to access the SharePoint Online site permissions but don’t know how? If so, this blog post is for you! With a few steps, you will be able to view all of…

Read more

PowerShell ForEach Loop, ForEach-Object Cmdlet: Beginner’s Guide

Loops are an essential part of any programming or scripting language, allowing you to repeat a task multiple times without rewriting the code. In PowerShell, there are several looping constructs available, with the ForEach loop and ForEach-Object cmdlet being two of the most commonly used options. They allow you to iterate through…

Read more