PowerShell: Uppercase the First Letter of Each Word

powershell uppercase first letter of each word

Recently, I got a requirement to convert the first letter of each word to uppercase in PowerShell. I tried different methods and tried to share. In this tutorial, I will show you how to uppercase the first letter of each word in PowerShell using different methods. To capitalize the first letter of each word in … Read more

How to Convert String to Camel Case in PowerShell?

Convert String to Camel Case in PowerShell

Camel case is a popular programming naming convention in which the first letter of the first word is lowercase, and the first letter of each subsequent word is capitalized, with no spaces or punctuation between words. For example, “convert string to camel case” becomes “convertStringToCamelCase.” This naming convention is often used in variable and function … Read more

How to Replace Multiple Strings in a File Using PowerShell?

Replace Multiple Strings in a File Using PowerShell

Recently, someone asked me to write a complete PowerShell script to replace multiple strings in a file. In this tutorial, I will show you how to replace multiple strings in a file using PowerShell using different methods. To replace multiple strings in a file using PowerShell, you can utilize the -replace operator in a chained … Read more

How to Convert a String to a Binary Number in PowerShell?

Convert a String to a Binary Number in PowerShell

Recently, I was required to convert a string to a binary number in PowerShell. I tried different methods. In this tutorial, I will show you how to convert a string to a binary number in PowerShell using different methods with examples. To convert a string to a binary number in PowerShell, you can use a … Read more

PowerShell String Comparison: Case-Sensitive vs Case-Insensitive

Case-Insensitive String Comparison in PowerShell

As a PowerShell developer, you should know everything about how to perform both case-sensitive and case-insensitive string comparisons in PowerShell. In this tutorial, I will guide you through the various methods available in PowerShell for string comparison with complete code and examples. In PowerShell, string comparisons can be performed both case-insensitively and case-sensitively. By default, … Read more

PowerShell Print Variable [With Examples]

powershell print variable

While working in PowerShell, there will be times when you are required to print the value of variables for debugging or logging purposes. In this tutorial, I will explain how to print variables in PowerShell using different methods and examples. To print a variable in PowerShell, you can use the Write-Output cmdlet, which sends the … Read more

How to Convert Bytes to Base64 String in PowerShell?

Convert Bytes to Base64 String in PowerShell

Base64 encoding is a common technique used to represent binary data in an ASCII string format. This is particularly useful when you need to encode binary data for text-based protocols such as email or JSON. In PowerShell, converting bytes to a Base64 string can be done efficiently using built-in .NET methods. In this tutorial, I … Read more

How to Get Computer Name in PowerShell?

Get Computer Name in PowerShell

Recently, someone asked me to get the computer’s name in PowerShell. I tried different methods. In this tutorial, I will show you how to get the computer name in PowerShell using various cmdlets. To get the computer name in PowerShell, you can use several methods. The simplest is using the environment variable $env:COMPUTERNAME. Alternatively, you … Read more

How to Check if a Variable is Null in PowerShell?

Check if a Variable is Null in PowerShell

Recently, one of my subscribers asked me about checking if a variable is null in PowerShell. This is a very common requirement if you are working with PowerShell. In this tutorial, I will explain different methods to check if a variable is null in PowerShell, with examples and complete scripts. To check if a variable … Read more

How to Restart a Computer Using PowerShell?

I will show you here how to restart a computer using PowerShell. We will see different cmdlets with examples. To restart a computer using PowerShell, you can use the Restart-Computer cmdlet. For a local restart, simply run Restart-Computer in an elevated PowerShell session. To restart a remote computer, use Restart-Computer -ComputerName “RemoteComputerName” and provide credentials … 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.