Practical solutions

PowerShell Howtos How-To Guides

Solve the problem. Keep building. Collection of Windows powershell how-to articles

Find the answer you need

Browse practical solutions, grouped by the task you're working on.

__COUNT__ entries on this page

How to Manage Registries Using Windows PowerShellLearn how to back up a specific Windows Registry key, import a reviewed .REG file, and inspect registry values with PowerShell. How to Install MSI File in PowerShellInstall a Windows MSI package from PowerShell with msiexec.exe, wait for completion, interpret its exit code, and troubleshoot common launch problems. How to Replace Strings in PowerShellThe tutorial shows how to utilize the PowerShell replace method and PowerShell replace operator. Boolean Values in PowerShellLearn how PowerShell Boolean values work, how comparisons and commands produce them, and how to use them in scripts. How to Compare the Contents of Two String Objects in PowerShellThis article explores several approaches to comparing the contents of two string objects in PowerShell, from basic equality and inequality checks using operators like -eq and -ne to more advanced techniques involving the method Equals(). Logical Operators in PowerShellLearn how PowerShell's `-and`, `-or`, `-xor`, and `-not` operators combine or reverse conditions in `if` statements. How to Execute Commands Using PowerShell RemotingLearn how PowerShell Remoting works, configure and verify WinRM, create and reuse a PSSession, and run one-off commands with Invoke-Command. How to Split a String Into Separate Variables in PowerShellThis tutorial will introduce splitting a string into separate variables in PowerShell. Learn how to use the -split operator, Split() method, and regular expressions for effective string manipulation. Enhance your scripting capabilities and streamline workflows with these essential techniques. How to Check if String Is Empty in PowerShellLearn how to check if a string is empty in PowerShell with various methods like using the -eq operator, String.IsNullOrEmpty(), and more. This guide provides clear examples and explanations to enhance your scripting skills. Whether you're a beginner or an experienced user, mastering string validation is essential for writing robust PowerShell scripts. How to Delete Services Using PowerShellIdentify an orphaned Windows service, confirm its short name, remove it with an available PowerShell command or sc.exe, and verify the result. How to Use Credential Manager Module in PowerShellThis article will discuss installing the Credential Manager module in PowerShell and utilizing its commands to manage our stored passwords. The echo Equivalent in PowerShellLearn which PowerShell command replaces echo and when to use pipeline, host, debug, and verbose output. How to Add Items to Array in the PowerShellThis tutorial will teach you to add items to an array in PowerShell. PowerShell UnzipThis article introduces how to unzip a zip file in powershell. How to Round Numbers in PowerShellLearn when to use PowerShell Math methods to truncate, round down or up, and round numbers to a whole number or chosen decimal places. How to Copy Folder With Subfolders in PowerShellThis tutorial teaches you how to copy a folder with subfolders using PowerShell. How to Display Message Box in PowerShellThis article will discuss the valuable functions of PowerShell GUI called Message Boxes, and we will learn how to write and output them using PowerShell. How to Map an SMB Drive Using PowerShellMap a Windows SMB share to a drive letter with New-SMBMapping or net use, then verify or remove the connection and review credential and persistence considerations. How to Remove Item From an Array in PowerShellLearn when to use an ArrayList or filter an array to remove items by value, index, range, or condition in PowerShell. How to Return Several Items From a PowerShell FunctionThis tutorial will teach you to return multiple values from a PowerShell function. How to Change the Working Directory in PowerShellThis article will show how to change your working directory in Windows PowerShell properly, and how it differs from Command Prompt syntax. How to Use the Where-Object Command in PowerShellLearn how Where-Object filters pipeline objects with script blocks, property conditions, aliases, and combined predicates. How to Get-ADComputer -Filter in PowerShellLearn how to use Get-ADComputer -Filter in PowerShell to find Active Directory computer accounts by name or operating system, select properties, and export the results. How to Edit a Text File on the Console Using PowerShellThis tutorial will teach you how to edit a text file on the PowerShell console using various methods. Learn to use commands like Set-Content, Add-Content, and Out-File to manipulate text files efficiently. Whether you prefer a graphical interface or command-line solutions, this guide covers all the essential techniques for editing text files in PowerShell. Enhance your productivity and streamline your workflow with these practical tips and tricks.