Getting the list of the last modified software on Windows is actually simple, if using PowerShell
Photo by Miti on Unsplash |
Using Get-WmiObject
The Get-WmiObject cmdlet is what we need to get Windows diag information. By combining it with Export-Csv we can export all installed software on our machines with:
Get-WmiObject -Class Win32_Product | Export-Csv installed.csv
Using Get-ChildItem
The next part consists in using the Get-ChildItem cmdlet to filter out our exported data. That can be done with:
# getting last modified files
Get-ChildItem C:\ -rec | sort LastWriteTime | select -last 1000 | Export-Csv files.csv
Get-ChildItem C:\ -rec | sort LastWriteTime | select -last 1000 | Export-Csv files.csv
Conclusion
Doing this simple exercise was fun, simple and quick using PowerShell. Don't know PowerShell yet? I would urge you to take a look and learn it (even if just the basics). PowerShell is a powerful tool used extensively in devops on Windows, Azure and Linux.Oh, and yes, I really don't miss the days before PowerShell!
References
- Get-WmiObject
- Get-ChildItem
- Export-Csv
- PowerShell.org
- Installing PowerShell Core on Linux
- Find latest modified file information in PowerShell
- Windows : How to list files recursively with size and last access date?
See Also
- My journey to 1 million articles read
- Determining installed .NET Framework versions using PowerShell
- PowerShell - The server committed a protocol violation
- Windows Subsystem for Linux, the best way to learn Linux on Windows
- Why I use Fedora
- How I fell in love with i3
- Diagnosing and Fixing WSL initialization issues
- Creating a Ubuntu Desktop instance on Azure