Convert Canonical Name to Distinguished Name in PowerShell

Learn how to convert a canonical name to a distinguished name in PowerShell with a practical AD-focused script and clear examples. This guide shows the exact logic, common pitfalls, and a safe way to verify the result. I’ve had to do this when scripts received paths in canonical format, but Active Directory commands needed the … Read more

How to Convert SHA256 to MD5 in PowerShell

I have seen this issue many times during file migrations and software deployments. An admin receives a SHA256 checksum from a vendor, but an older application or internal inventory process still expects an MD5 value. The important detail is that you cannot truly convert a SHA256 hash into an MD5 hash. Hashes work in one … Read more

How to Convert Negative to Positive in PowerShell

Convert Negative to Positive in PowerShell

A few weeks ago, I was reviewing disk space and server health data from a small company’s monitoring export. Several reports stored changes as negative numbers, such as -12.5 GB or -340 MB, but the operations team needed positive values for a clean summary. Converting negative to positive in PowerShell is simple once you know … Read more

How to Run PowerShell as Different User

run powershell as different user

I’ve had plenty of moments where I needed to open PowerShell with another account just to test permissions, access a secured share, or run a script under an admin profile. It usually happens when your current session does not have the right rights, but you do not want to log off and back on. That … Read more

How to Convert Binary to Decimal in PowerShell

Convert Binary to Decimal in PowerShell

If you work in networking, security, systems administration, or low-level scripting, you’ll regularly encounter binary numbers — subnet masks, permission bits, hardware flags, IP addresses, and bitmask values. Being able to convert binary strings to decimal integers in PowerShell is a fundamental skill that unlocks clean, readable solutions to problems that would otherwise require manual … Read more

How to Convert JPG to PDF Using PowerShell (4 Methods)

If you’ve ever needed to convert a bunch of JPG images into PDF files without clicking through some online tool or installing bloated software, PowerShell is your best friend. It’s already on your Windows machine, it’s scriptable, and once you set it up — you can convert one file or a thousand with the same … Read more

Copy-Item Skip Existing File PowerShell (5 Easy Methods)

You’re running a nightly backup script, and it keeps overwriting files that already made it to the destination folder. That’s wasted time, wasted bandwidth, and a real risk if the newer copy accidentally replaces a good file with a broken one. This happens because Copy-Item, the built-in PowerShell cmdlet for copying files and folders, doesn’t … Read more

Skip to Next Item in PowerShell ForEach Loop (4 Easy Ways)

Skip to Next Item in PowerShell ForEach Loop

You’re writing a PowerShell script to process 500 log files from a server. Halfway through, you realize some files are empty or corrupted — and you don’t want those to break your entire loop. You just need the script to skip the bad file and move on to the next one. That’s exactly the problem … Read more

How to Use PowerShell Remove-Item with Try Catch (With Real Examples)

PowerShell Remove-Item with Try Catch

When working with files and folders in PowerShell, the Remove-Item cmdlet is one of the most commonly used commands for deleting items. While it works well in straightforward scenarios, things don’t always go as planned. A file might be locked by another process, you may not have sufficient permissions, or the specified path may not … Read more

How to Extract URLs from XML Sitemap Using PowerShell (Step-by-Step)

Extract URLs from XML Sitemap Using PowerShell

I recently had a requirement where I needed to extract only SharePoint-related URLs from a large XML sitemap file. The sitemap contained thousands of URLs, and manually filtering them was not practical at all. I specifically wanted to identify URLs that included keywords like “sharepoint” or “share-point” so I could use them for further analysis … 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.