powershell notes
:: Start :: Technology :: Computer & Internet
Page 1 of 1
powershell notes
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 *
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- Number of posts : 145
Registration date : 2008-11-14
:: Start :: Technology :: Computer & Internet
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|