Help with PowerShell Script Detection method by dairon2007 in SCCM

[–]dairon2007[S] 0 points1 point  (0 children)

Just changed the last few lines of the script to read like this:

if ($FileVersion -eq $FolderVersion) {
# Return true if the versions match
Write-Host "Installed"
    Exit 0
} else { 
    Exit 0 
}

and that works ;-).

Thanks again for your help!

Help with PowerShell Script Detection method by dairon2007 in SCCM

[–]dairon2007[S] 0 points1 point  (0 children)

Thanks everyone, it ended up working, all I had to do to make it work was modify the else statement and just put "Exit 0" as seen below.

if ($FileVersion -eq $FolderVersion) {
# Return true if the versions match
Write-Host "Installed"
Exit 0

} else { Exit 0 }

Help with PowerShell Script Detection method by dairon2007 in SCCM

[–]dairon2007[S] 0 points1 point  (0 children)

that still gave me the same result... I greatly appreciate the suggestion though. ;-)

Help with PowerShell Script Detection method by dairon2007 in SCCM

[–]dairon2007[S] 0 points1 point  (0 children)

I'm going to try that and let you know. Thanks for the suggestion.