From 8d3b826179849fa9491276a7ae6068ad38794c6b Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sun, 18 Dec 2022 20:10:01 +0300 Subject: [PATCH] Update Sophia.psm1 --- src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 index 5a1f6481..595dca46 100644 --- a/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 +++ b/src/Sophia_Script_for_Windows_10/Module/Sophia.psm1 @@ -9025,8 +9025,8 @@ function UninstallPCHealthCheck # Find the necessary .msi with the Subject property equal to "Windows PC Health Check" foreach ($MSI in @(Get-ChildItem -Path "$env:SystemRoot\Installer" -Filter *.msi -File -Force)) { - $name = $Files.Keys | Where-Object -FilterScript {$_ -eq $MSI.Name} - $File = $Files[$name] + $Name = $Files.Keys | Where-Object -FilterScript {$_ -eq $MSI.Name} + $File = $Files[$Name] # https://learn.microsoft.com/en-us/previous-versions/tn-archive/ee176615(v=technet.10) # "22" is the "Subject" file property