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

Concatenate String with NewLine in PowerShell

powershell concatenate string with new line

Recently I got one requirement from one of my clients to concatenate a string with new line. I tried it using different methods using PowerShell. In this tutorial, I will show you how to concatenate strings with new line in PowerShell using various methods. To concatenate strings with a new line in PowerShell, you can … Read more

How to Concatenate Strings Inside Loops in PowerShell?

PowerShell Concatenate Strings Inside Loops

In one of the tutorials, I explained how to concatenate strings in PowerShell. Here, I will show you an advanced concept. I will explain how to concatenate strings inside loops in PowerShell using various methods. I will show how to do this in for loop, foreach loop, etc. String concatenation is the process of joining … Read more

How to Substring in PowerShell?

substring in PowerShell

Working with Substrings in PowerShell is a very common requirement when manipulating strings. Most of the time, I am required to get a substring of a string. In this PowerShell tutorial, I will explain how to substring in PowerShell and how to use the substring() method in PowerShell with various examples. To substring in PowerShell using the … Read more

How to Concatenate String and Integer in PowerShell?

powershell concatenate string and int using Join-String

Recently, I was working on a PowerShell task that required me to concatenate a string with an integer. I tried different methods. Let me show you how to concatenate strings and integers in PowerShell. To concatenate a string and an integer in PowerShell, you can use the + operator, which automatically converts the integer to a string: $result … Read more

PowerShell ForEach-Object vs ForEach

foreach-object vs foreach in PowerShell

Today, I thought I would share two important things used in Loops in PowerShell: ForEach-Object and ForEach. I will tell you the differences between these two. Let us explore PowerShell ForEach-Object vs ForEach. ForEach in PowerShell The ForEach keyword in PowerShell is used to iterate over a collection of items. It is a control flow statement that … Read more

How to Create a Site in SharePoint Online using PnP PowerShell?

Create a SharePoint site using pnp PowerShell

If you have permission, you can manually create a SharePoint site using a browser from the SharePoint admin center. But what about a production environment where these manual activities are restricted? You can use PowerShell. I will show you how to create a SharePoint site using PnP PowerShell. I will show you examples of: Create … 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.