PowerShell New Line in String

powershell new line in string

When writing PowerShell scripts, one of the most common tasks you’ll encounter is formatting text output. Whether you’re sending messages to the console, writing logs to a file, or generating reports, adding a new line (or line break) is essential for readability and structure. In this tutorial, we’ll explore multiple ways to add a new … Read more

How to Pass Variables to a PowerShell Script?

If you’re working with PowerShell regularly—whether for system administration, DevOps automation, or cloud management—you’ve likely encountered a situation where you need to make your scripts more dynamic. Instead of hardcoding values, you can pass variables to a PowerShell script at runtime. In this detailed tutorial, you’ll learn multiple ways to pass variables to PowerShell scripts, … Read more

How to Convert Char to Int using PowerShell

Convert Char to Int using PowerShell

Characters are stored internally as numeric codes—usually Unicode or ASCII values—and sometimes you need these numbers. For example, you might need to convert the letter ‘A’ into its numeric value 65 when preparing data for encryption or checking character ranges. In this tutorial, I explain multiple methods for converting characters into integers in PowerShell with real examples. Characters and … Read more

How to Convert String to Decimal in PowerShell

PowerShell convert string to decimal examples

Recently, I was processing a user input in a PowerShell script where I wanted to convert a string to a decimal value. In this tutorial, I will explain how to convert a string to a decimal in PowerShell using different methods with examples. PowerShell is a dynamically typed language, which means variables don’t require explicit … Read more

How to Convert Unicode to ASCII using PowerShell

Convert Unicode to ASCII using PowerShell

When working with text processing, data migration, or system integration in PowerShell, encoding challenges often arise. Unicode is now the default for most systems and applications. However, situations may require conversion to ASCII—for instance, when supporting legacy applications, cleaning data, or prepping information for APIs that cannot handle special characters. In this tutorial, I will … Read more

How to Convert HEIC to JPG using PowerShell

If you’ve ever tried to open your iPhone photos on a Windows PC, you might’ve encountered that mysterious .heic extension. It is not always easy to work with outside the Apple ecosystem. If you are looking for an easy way to convert those HEIC files to the more universally friendly JPG format, you’ve come to the right … Read more

How to Convert JSON to XML using PowerShell?

Convert JSON to XML using PowerShell

JSON (JavaScript Object Notation) and XML (eXtensible Markup Language) are two widely used data formats in modern IT environments. However, we often need to convert JSON files to XML files using PowerShell. This tutorial explains how to convert JSON to XML using PowerShell, and I will cover step-by-step instructions, practical examples, and common mistakes that … Read more

Convert Bytes to GB in PowerShell

Convert Bytes to GB in PowerShell

If you’ve spent any time working with files or data—whether it’s in a spreadsheet, an enterprise database, or server logs—you’ve probably run into numbers that just don’t make immediate sense. File sizes like “8388608” or “10737418240” appear everywhere, but without some context, it’s tricky to see how they relate to your storage or daily tasks. … Read more

PowerShell Convert XML to Object

powershell convert xml to object examples

Working with XML data is a common task for system administrators, developers, and IT professionals. Whether you are dealing with configuration files, API responses, or exported reports, XML is still widely used for structured data storage and transfer. In PowerShell, XML can be directly converted into objects, which makes working with data much easier. Instead … Read more

Measure-Object in PowerShell [With Examples]

Measure-Object in PowerShell

PowerShell’s Measure-Object cmdlet is a powerhouse for quickly analyzing data—be it counting items, calculating sums and averages, or measuring the length of strings and text files. Whether automating reporting or data aggregation tasks, mastering this cmdlet brings clarity and conciseness to scripts. What is Measure-Object in PowerShell? Measure-Object is a built-in cmdlet used to calculate numeric and statistical … 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.