initial project push
This commit is contained in:
27
Get-InstalledSoftware.ps1
Normal file
27
Get-InstalledSoftware.ps1
Normal file
@@ -0,0 +1,27 @@
|
||||
function Get-InstalledSoftware {
|
||||
$paths = @(
|
||||
"HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*",
|
||||
"HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
||||
)
|
||||
|
||||
$software = foreach ($path in $paths){
|
||||
Get-ItemProperty $path -ErrorAction SilentlyContinue |
|
||||
Where-Object { $_.DisplayName } |
|
||||
Select-Object @{
|
||||
Name = "Name"; Expression = { $_.DisplayName }
|
||||
}, @{
|
||||
Name = "Version"; Expression = { $_.DisplayVersion }
|
||||
}, @{
|
||||
Name = "Publisher"; Expression = { $_.Publisher }
|
||||
}, @{
|
||||
Name = "InstallDate"; Expression = { $_.InstallDate }
|
||||
}
|
||||
}
|
||||
|
||||
return $software | Sort-Object name -Unique
|
||||
}
|
||||
|
||||
$timestamp = Get-Date -Format "MM-dd-yyyy-HH-mm"
|
||||
|
||||
# Get-InstalledSoftware | Format-Table
|
||||
Get-InstalledSoftware | ConvertTo-Json | Out-File "software_$($timestamp).json"
|
||||
BIN
software_03-25-2026-22-52.json
Normal file
BIN
software_03-25-2026-22-52.json
Normal file
Binary file not shown.
Reference in New Issue
Block a user