Would you like to react to this message? Create an account in a few clicks or log in to continue.

powershell notes

Go down

powershell notes Empty powershell notes

Post by sunt Wed Jun 08, 2022 11:07 am

1. Get installed software list with Get-WmiObject

Get-WmiObject -Class Win32_Product
Get-WmiObject -Class Win32_Product | where vendor -eq CodeTwo | select Name, Version

2. Query registry for installed software

$InstalledSoftware = Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall"
foreach($obj in $InstalledSoftware){write-host $obj.GetValue('DisplayName') -NoNewline; write-host " - " -NoNewline; write-host $obj.GetValue('DisplayVersion')}

$InstalledSoftware = Get-ChildItem "HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall"
foreach($obj in $InstalledSoftware){write-host $obj.GetValue('DisplayName') -NoNewline; write-host " - " -NoNewline; write-host $obj.GetValue('DisplayVersion')}

3. Getting the list of recently installed software from the Event Log
To check only the recently installed software, we use the following cmdlet to search through the Event Log.

Get-WinEvent -ProviderName msiinstaller | where id -eq 1033 | select timecreated,message | FL *
sunt
sunt

Number of posts : 145
Registration date : 2008-11-14

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum