PowerShell for Beginners: Uncovering Your Installed Applications
Admin User
January 27, 2025
Ever wondered exactly what's lurking in the depths of your Windows "Program Files" folder? Or maybe you need a quick way to list all those installed applications? PowerShell, with its command-line magic, can help! This beginner-friendly guide will walk you through creating a simple script to reveal all your installed applications and their installation locations.
Why PowerShell?
PowerShell is a powerful scripting language and automation engine built into Windows. It gives you far more control and flexibility than the traditional "Add or Remove Programs" window.
Let's Get Scripting!
-
Open PowerShell: Hit the Windows key, type "PowerShell," and select "Windows PowerShell."
The Command: The core of our script is the Get-WmiObject
command (also known as gwmi
). We'll use it to tap into the Windows Management Instrumentation (WMI), a treasure trove of information about your system.
-
The Script: Copy and paste the following code into your PowerShell window:
Get-WmiObject -Class Win32_Product | Select-Object Name, InstallLocation | Format-Table -AutoSize
Breaking it Down:
Get-WmiObject -Class Win32_Product
: This fetches information about all installed software.Select-Object Name, InstallLocation
: We're only interested in the application's name and where it's installed, so we select those properties.Format-Table -AutoSize
: This presents the output in a neat, organized table.
Run the Script: Press Enter and watch the magic happen! PowerShell will generate a table listing your installed applications and their installation folders.
Saving Your Script:
Want to use this again later? Easy!
- Open a plain text editor like Notepad.
- Paste the code into the editor.
- Save the file with a
.ps1
extension (e.g.,installed_apps.ps1
).
Now you can double-click that file to run your script anytime!
Going Further:
This is just the tip of the PowerShell iceberg. You can customize this script further, such as exporting the list to a CSV file or filtering the results. Explore the world of PowerShell – you'll be amazed at what you can achieve!
Troubleshooting:
- Script Execution Policy: For security reasons, PowerShell might prevent you from running scripts by default. If you encounter an error, you might need to adjust your execution policy. Type
Set-ExecutionPolicy RemoteSigned
in PowerShell (and confirm with "Y") to allow running locally created scripts.
Happy scripting!