How to Split String by Tab Character in PowerShell?

Split a String by Tab Character

Do you need to know how to split a string based on tab characters in PowerShell? This PowerShell tutorial will check different methods to split a string by a tab character in PowerShell. We will also cover how to split strings by special characters, escape characters, character count, and a few other examples. Split a … Read more

How to Split a String in PowerShell?

Split a String using The Split Operator in PowerShell

One of my clients recently required me to split strings into smaller substrings, so I suggested using PowerShell. This tutorial will explore various methods to split strings in PowerShell with examples. To split a string in PowerShell, you can use the -split operator or the .Split() method from the .NET String class. The -split operator … Read more

How to Concatenate Strings in PowerShell?

Concatenate Strings in PowerShell

If you are working with strings in PowerShell, then you might want to concatenate strings. In this PowerShell tutorial, I will show you different methods to concatenate strings in PowerShell. We will see how to combine multiple strings into a single string using PowerShell. To concatenate strings in PowerShell, you can use the + operator. For example, “John” … Read more

How to Get the First 10 Files in a Folder Using PowerShell?

Get the First 10 Files in a Folder Using PowerShell

It is easy to get files from a folder using PowerShell based on some conditions. In this PowerShell tutorial, I will show you multiple methods to get the first 10 files in a folder using PowerShell, ordered by their last modified date. Method 1: Using Get-ChildItem and Sort-Object To get the first 10 files in … Read more

How to Get Unique Values from CSV Using PowerShell?

Get Unique Values from CSV Using PowerShell

One of my clients was working on a CSV file, and they were required to find unique values from that CSV file. I suggested using PowerShell and told them a few methods. In this tutorial, I will explain to you four simple and useful methods to get unique values from CSV using PowerShell. Get Unique … Read more

How to Get Unique Lines from a File Using PowerShell?

Get Unique Lines from a File Using PowerShell

When working with text files in PowerShell, I got a requirement to extract unique lines from a file. I tried different methods and thought to share them with you. In this tutorial, we’ll check several methods to get unique lines from a file using PowerShell. Get Unique Lines from a File Using PowerShell PowerShell is … Read more

How to Count Duplicate Lines in a Text File Using PowerShell?

Count Duplicate Lines in a Text File Using PowerShell

Recently, I was working on some text files where I was required to count the number of duplicate lines using PowerShell. I have tried different methods to do this. In this tutorial, we’ll explore different ways to count duplicate lines in a text file using PowerShell. Method 1: Using Group-Object PowerShell provides the Group-Object cmdlet … Read more

How To Create File If Not Exists In PowerShell? [4 Methods]

Create File If Not Exists In PowerShell

One of my clients recently required me to create a file if it doesn’t exist. PowerShell is the best option for this kind of requirement. In this tutorial, I will show you different methods to check for the existence of a file and create it if it doesn’t exist using PowerShell. To create a file … Read more

How to Count Words in a File Using PowerShell?

powershell count words in file

Do you need to count the number of words in a file? Check out this tutorial. In this practical tutorial, I explain how to count words in a file using PowerShell. We will explore various methods with examples. To count words in a file using PowerShell, you can utilize the Measure-Object cmdlet. First, retrieve the file content … 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.