When you do a fresh OS install on your system, it’s a good idea to make a list of installed app. It will help you set up your PC after you’ve installed Windows on it. The list will make sure you don’t forget to install an essential app. The only problem is we install a lot of apps. It’s not easy making a list of them all. There is no simple export feature. If you’re looking to refresh the Windows installation on someone else’s PC, or multiple PCs, the task is all the more difficult. The good news is you can use a PowerShell script to get a list of installed apps on a local or remote computer. Here’s how.
Download the Get a List of Installed Application from computers (PowerShell) script via the link at the bottom. Rename it so that ‘PowerShell’ doesn’t appear in the script’s name, or in the name of the folder the script is in.
The script is a PSM1 file. It’s a PowerShell module that you need to import.
Import PowerShell Module
Open PowerShell with administrative rights. Type the following command, followed by the path to the PSM1 file.
import-module "path to file"
The command will look like this;
If at any point, PowerShell tells you that scripts are blocked by the Execution Policy, you will have to stop and edit the PowerShell Execution Policy before you can import the module.
Get A List Of Installed Apps
Open the PSM1 file using Notepad. It will tell you all the functions the script adds to PowerShell. In this case, it adds the following function which will give you a list of installed apps on a local or remote system.
In PowerShell, run the above command. It will ask you to enter the name of the computer you want to get the list of installed apps for. You can enter the name of your own computer and get a list of apps installed on it, or enter the name of a network computer. The script lets you enter multiple computer names and fetches the list of apps for all of them.
The script can save the list of installed apps to a CSV file. Use the following command to save the list to a CSV file. You can name the CSV file anything you want and save it wherever you like.
Get-OSCInstalledApplication -ComputerName "Computer Name" | Export-Csv -Path C:\installedApps.csv
Last but not least, if you’re working with lots of computers, you can import the name of the computers from a CSV file. Use the following command.
Get-OSCInstalledApplication -ComputerFilePath C:\Script\ComputerList.csv
This should, hopefully, make things easier for you after a fresh Windows installation.