Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

Add PsVersion Control #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Sherlock.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ function Get-FileVersionInfo ($FilePath) {

function Get-InstalledSoftware($SoftwareName) {

if ( $(PSVersionTable.PSVersion.Major) -le "2" )
{
return $false
}

$SoftwareVersion = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -eq $SoftwareName } | Select-Object Version
$SoftwareVersion = $SoftwareVersion.Version # I have no idea what I'm doing

return $SoftwareVersion

}
Expand Down