PowerShell: IsNullOrEmpty vs IsNullOrWhiteSpace

powershell isnullorempty vs isnullorwhitespace

When working with strings in PowerShell, checking whether a string is null, empty, or consists solely of whitespace characters is often necessary. PowerShell provides two methods to perform these checks: IsNullOrEmpty and IsNullOrWhiteSpace. In this PowerShell tutorial, I will show the differences between IsNullOrEmpty() and IsNullOrWhiteSpace() methods. The primary difference between PowerShell IsNullOrEmpty() and IsNullOrWhiteSpace() is that IsNullOrWhiteSpace considers strings that contain only whitespace … Read more

PowerShell IsNullOrEmpty() Example

PowerShell isnullorempty

Recently, I got a requirement to check whether a variable or string is null or empty. I tried this using the IsNullOrEmpty() method in PowerShell. In this tutorial, I will show you examples related to the PowerShell IsNullOrEmpty() method. What Are Null and Empty in PowerShell? Before checking a few examples of IsNullOrEmpty method, let’s understand what … Read more

PowerShell Not Operator [With Examples]

PowerShell Not Operator

Do you want to know about the not operator in PowerShell? In this tutorial, I will explain everything about the PowerShell Not operator, its syntax, and a few examples of the not operator in PowerShell. What is the Not Operator in PowerShell? The Not operator in PowerShell is used to reverse the logical state of its … Read more

How to Delete All Items from a SharePoint List using PnP PowerShell?

delete sharepoint list items using pnp powershell

Recently, I got an urgent requirement to delete all the items from a SharePoint Online list. PowerShell is the best option for bulk deleting list items. In this tutorial, I will show you how to delete all items from a SharePoint list using PnP PowerShell and PowerShell. I recommend using PnP PowerShell to delete items … Read more

How to Use -and Operator in PowerShell?

-and Operator in PowerShell

If you want to know about the logical operators in PowerShell, then you should know about the -and operator in PowerShell. In this tutorial, I will explain everything about the PowerShell -and operator, its syntax, and various examples of -and operator in PowerShell. What is the -and Operator in PowerShell? The -and operator in PowerShell … Read more

Create, Read, Update, and Delete an Item from a SharePoint Online List using PnP PowerShell

add new item to sharepoint list using powershell

In this tutorial, I will show you how to create, read, update, and delete an item from a SharePoint Online list using PnP PowerShell. This is a complete CRUD (Create, Read, Update, Delete) operation in SharePoint list items using PnP PowerShell. For all the examples, I will use the below SharePoint list named “ProjectTasks” with the following … Read more

How to Concatenate String and Variable in PowerShell?

Concatenate String and Variable in PowerShell

Recently, I was required to concatenate strings with variables in PowerShell. I tried different methods. In this tutorial, I will explain how to concatenate strings and variables in PowerShell with examples. To concatenate strings with variables in PowerShell, you can use the + operator, which directly combines strings and variables. For example, $city = “New … Read more

PowerShell -contains Operator [With Examples]

PowerShell -contains Operator

As a PowerShell developer, you should know how to use the -contains operator in PowerShell. In this tutorial, I will explain how to use the PowerShell -contains operator with examples. What is the -contains Operator in PowerShell? The -contains operator in PowerShell is used to determine whether a specified item exists within a collection, such … Read more

100 PowerShell cmdlets download free

100 POWERSHELL CMDLETS E-BOOK

FREE Download an eBook that contains 100 PowerShell cmdlets with complete script and examples.