PowerShell For Loop [With Examples]

PowerShell for loop try catch

Recently, while working on a PowerShell script, I was required to iterate over a block of code multiple times. For this, I used the for loop in PowerShell. In this tutorial, I will show you how to work with the PowerShell for loop with various examples. What is a for loop in PowerShell? A For loop in … Read more

How to Trim Strings in PowerShell?

Trim Strings in PowerShell

If you are working with strings, you will have a very common requirement of trimming a string in PowerShell. There are various methods to do this. In this tutorial, I will show you how to trim strings in PowerShell using various methods. To trim strings in PowerShell, you can use methods like Trim(), TrimStart(), and TrimEnd(). These methods … Read more

How to Use Exclamation Mark in PowerShell If Statements?

Exclamation Mark in PowerShell If Statements

In one of the previous tutorials, I explained how to use the if-else statement in PowerShell. Now, I will show you how to use exclamation mark in PowerShell If Statements. An exclamation mark (!) serve as a logical negation operator; we can use it in PowerShell if statements. Exclamation Mark in PowerShell If Statements If … Read more

How to Convert Strings to Lowercase or Uppercase in PowerShell?

Convert Strings to Lowercase in PowerShell

Almost all the PowerShell scripts I have worked on, especially those related to strings, always require converting strings to lowercase or uppercase. So, I thought of writing a complete tutorial on this. In this tutorial, I will show you how to convert strings to lowercase or uppercase in PowerShell using various methods. To convert strings … Read more

PowerShell Function Examples with Parameters

powershell function example multiple parameters

As a PowerShell developer, you should know how to use parameters in PowerShell functions. In this tutorial, I will show you how to create PowerShell functions with parameters, including both single and multiple parameters. PowerShell function with Parameter Let’s start with a simple example of a PowerShell function that accepts a single parameter. This can … Read more

How to Check if a String Contains Multiple Values in PowerShell?

Check if a String Contains Multiple Values in PowerShell

While working on a PowerShell script, I was required to check if a string contains multiple values. I tried different methods, and in this tutorial, I will show you how to do so with complete scripts and examples. To check if a string contains multiple values in PowerShell, you can use the -match operator with … Read more

How to Use Multiple Conditions in PowerShell If Else Statement?

Multiple Conditions in PowerShell If Else Statement

If you want to become an expert in PowerShell, then you should know how to use multiple conditions in the PowerShell if-else statement. I will show you how it works here with various examples. As a PowerShell developer, you might be required to add multiple conditions in an if-else statement. So, let’s get started. Before … Read more

How to Check if a String Contains a Substring in PowerShell?

Check if a String Contains a Substring in PowerShell

Recently, I got a requirement from one of my clients to check if a string contains a substring. I tried various methods in PowerShell. In this tutorial, I will explain how to check if a string contains a substring in PowerShell using various methods with examples. To check if a string contains a substring in … 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.