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

PowerShell ForEach-Object [With Examples]

PowerShell ForEach-Object

Today, I am going to explain a very useful concept in PowerShell: the ForEach-Object cmdlet. This is the most widely used cmdlet in PowerShell. I will show you detailed examples of PowerShell ForEach-Object. The ForEach-Object cmdlet in PowerShell processes each item in a collection individually, allowing for operations such as modifying properties or executing commands. … Read more

PowerShell Switch Case with Regex

powershell switch regex case insensitive

Recently, I was working on some examples of the PowerShell switch case, and I learned how to use Regex in the Switch case in PowerShell. Let me explain to you with a few examples. Before discussing using the regex with the PowerShell Switch the statement, let me show you a simple example of the switch statement. PowerShell … Read more

PowerShell Switch Parameter [With Examples]

PowerShell Switch Parameter

In PowerShell, a switch parameter is a special type of parameter used in functions and scripts to represent a Boolean option. A switch parameter can either be present (true) or absent (false), and it does not require an explicit value to be passed. I will explain here, everything about the PowerShell Switch Parameter with various … 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.