There is a now a ReadMe.txt file contained within the attached zip file.
You will also need to "unblock" the file, right click on the file, select properties and at the bottom check the "unblock" checkbox. This is a security precaution introduced by windows to stop inadvertent execution of files downloaded from the internet. This must be done before extracting the zip file contents.
Following that please unzip the contents into a new directory/folder
This next action may be required to enable scripts to run. If you see the following output:
PS C:\> <path>\GetInstalledProgramList.ps1
<path>\GetInstalledProgramList.ps1 : File
<path>\GetInstalledProgramList.ps1 cannot be loaded because running scripts is disabled on
this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ <path>\GetInstalledProgramList.ps1 -Windo ...
+ CategoryInfo : SecurityError: (:) , PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
You will need to look at the execution policy settings on your system open a powershell window and type Get-ExecutionPolicy -list:
PS C:\> Get-ExecutionPolicy -list
If it looks like the above output, I recommend that if you are an administrator you do not do the next step UNLESS you know what you are doing
, but create a new user WITHOUT administrator privileges
then type the following command:
PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): y
PS C:\> Get-ExecutionPolicy -List
After making the above change the script (and any other script
) will be able to run.
The simplest of command lines is:
The script will prompt for every option I suggest just taking the Windows Updates option with no TXT or CSV output, results will be to the console
The most output will be obtained with the following command line:
<path>\GetInstalledProgramList.ps1 -RunAsAdmin -InstalledPrograms -Installe
dStorePrograms -WindowsUpdates -Console -Csv -Txt
Leave out the options you don't want or require there must be at least one output option for the script to run either:
-Console, -Csv or -Txt
If none are given the script will prompt:
Do you want a .txt file created? [Y/N]: n
Do you want a .csv file created? [Y/N]: n
The replies of "n" (as above) will result in output to the console.
Edit: 18th Dec 2017.
I have changed the script quite a bit, it still does the same job but the output file names have changed to enable some extra facilities.
1). There is now an HTML output
2). It creates dated files so you can keep as many as you want - there is a "tidy" option to remove files older than 'n' days
3). It will track the differences between runs so you can see what has changed.
I use this as the scheduled options to powershell run as administrator:
-executionpolicy bypass -noprofile "<path>\GetInstalledProgramList.ps1" -WindowsUpdates -InstalledPrograms -InstalledStorePrograms -Html -Txt -Difference -Tidy 30 -Log
Edit: 2018/01/29 & again on 2018/01/30 to fix some typo's and add the version info.
Latest version (Version 3.20) will now provide the following information:
1) Installed Programs (as seen in Control Panel > Programs & Features,)
2) Installed Windows Store apps.
3) Installed Windows Updates
4) Installed Windows Drivers
5) Installed Windows Devices
To provide windows devices output a module from the Microsoft TechNet gallery has been utilized. I have included a link to the relevant information in the zip file.
In order to give windows a chance to complete its startup sequence there is now a -Delay <n> where <n> is in minutes so if you create a scheduled task which runs at startup (possibly following a missed iteration) hopefully all the relevant tasks will have completed their startup actions before the script runs to compare two (relatively) stable situation
Thanks to JPHUGHAN and GROVER for their help in ironing out the issues in previous versions, hopefully this one will stand the tests of anyone who decides to give it a try.
Changed file names so script can be run more that once in a day to add items changed between runs to the History file(s)
Some minor bug fixes
It will require:
requires -Version 3.0 -Modules CimCmdlets, DeviceManagement, Dism
Windows10 Pro X64 V1903 B18362.239 MR v7.2.4325