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

How to Check if a String Contains Special Characters in PowerShell?

Check if a String Contains Special Characters in PowerShell

In PowerShell, you can use various methods like contains() methods to check if a string contains special characters in PowerShell. Let us check all the methods with examples. To check if a string contains special characters in PowerShell, you can use the -match operator with a regular expression pattern like [^a-zA-Z0-9], which matches any non-alphanumeric … Read more

PowerShell If-Else String Comparison [With Examples]

PowerShell if else string comparison

In this tutorial, I will explain how to work with string comparison in PowerShell if else. I hope you know how an if-else statement works in PowerShell. Here, we will see a few examples of PowerShell if-else string comparison. PowerShell If-Else String Comparison Before showing you the string comparisons, let me give you an overview … 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.