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 Set the PATH Environment Variables in Windows PowerShellThis article will show the proper way of setting the path environment variable in Windows PowerShell. This article also shows how to set the variables in both persistent and non-persistent method. How to Run PowerShell Script as AdministratorThis article will show how to run powershell scripts with administrator privileges without inputting the administrator credentials. The scripts below will self-elevate your script if the code snippet is not running in elevated Windows PowerShell. How to Run exe File in PowerShellrun exe file in powershell How to Run Curl Command in PowerShellrun curl command in powershell How to Write Output in Windows PowerShellThis article will show you how to write or print an output in Windows PowerShell. This article will also differentiate multiple write cmdlets and explain their significance. How to Comment Out Code in PowerShellThis article will show numerous ways of commenting out code in Windows PowerShell. This article also features a few best practices when commenting out code. How to Read Files Line by Line in Windows PowerShellThis article will show you ways on how to read files line by line in Windows PowerShell. This will avoid crashes and freezing of your scripting environment when reading very large files. How to Get Command Line Arguments in Windows PowerShellThis article will explain how can we handle command line arguments using PowerShell's parameter function, how parameters work, how we can pass values to parameters using PowerShell arguments, and what are the basic methods of defining a parameter. How to Get Current User in PowerShellThis article introduces how to get current user in powershell. How to Convert String to Integer in PowerShellThis tutorial will teach you to convert string to integer in PowerShell. How to Wait for Each Command to Finish in PowerShellThis article will explain multiple ways on how to wait for each command to finish before proceeding to the next command line in PowerShell. How to Update Windows PowerShell to the Latest VersionThis article will teach about installing on-demand updates for Windows PowerShell 5.1. This article will also show how to install and updatethe newest Windows PowerShell (Core) 7. How to Start Processes With Windows PowerShellThis article will explain what the Start-Process cmdlet is and how the parameters function with the cmdlet. This article also shows the benefits of using the Start-Process cmdlet How to Create Directory Using Windows PowerShellThis article will show you multiple ways on how you can create directories and folders using Windows PowerShell. How to Get All Group Membership of a User Using PowerShellThis article will discuss the methods on how to get all of the group membership of a specific user, their advantages and disadvantages, and how they are correctly executed. How to Download File in PowerShellThis article introduces how to download file in PowerShell. How to Get the Value of a Registry Key Using PowerShellThis article will explain what registry keys are, how to back up the registry, and how to query the value of a specific registry key. How to Search a String in Multiple Files and Return the Name of Files in PowerShellThis tutorial will teach you to search a string in multiple files and return the name of files in PowerShell. How to Return Value in PowerShellThis article explains the purpose of the return value keyword, how the return keyword works, and how to use them in Windows PowerShell properly. How to Get the Localhost Name in PowerShellThis article will discuss what localhost is and explain several methods to get the localhost name of the computer using Windows PowerShell. How to Use the Where-Object Command in PowerShellThis article will discuss several ways to construct filtering statements using the Where-Object command, its syntax, and the use of multiple conditional statements using a singular where object statement. How to Export Output to Text File in PowerShellThis article shows ways to export the PowerShell output of a common command to a text file. How to Select the Values of One Property on All Objects of an Array in PowerShellThis tutorial will teach you to select the values of one property on all objects of an array in PowerShell. How to Get Credential Using PowerShellThis article will discuss how to use the Windows PowerShell Get-Credential cmdlet and how to get a credential without any prompts.