Hi,
I am trying to deploy X64 Version of Teams and even though the below script for my detection method is outputting False it says the machine is already compliant in SCCM. This is a user based installation and I ran the script under the user context on the PC and the result was False but SCCM reports already compliant. Is there an issue when using a detection method like this that results in a true or false?
if (Test-Path $("${Env:LOCALAPPDATA}"+"\Microsoft\Teams\current\Teams.exe"))
{
$teamsexecutable = get-item ("${Env:LOCALAPPDATA}"+"\Microsoft\Teams\current\Teams.exe")
if (!($teamsexecutable.length -eq 90941720)){
$teamscurrentversion = ([System.Diagnostics.FileVersionInfo]::GetVersionInfo($teamsexecutable)).ProductVersion
[version]::Parse("$teamscurrentversion") -ge [version]::Parse("1.4.00.2879")
}
}
