Browse Source

Update Sophia.psm1

pull/431/head
Dmitry Nefedov 1 year ago
committed by GitHub
parent
commit
0380bc10af
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

7
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -291,13 +291,14 @@ function Checks
# Checking services
try
{
$services = Get-Service -Name Windefend, SecurityHealthService, wscsvc -ErrorAction Stop
$Services = Get-Service -Name Windefend, SecurityHealthService, wscsvc -ErrorAction Stop
}
catch [Microsoft.PowerShell.Commands.ServiceCommandException] {
catch [Microsoft.PowerShell.Commands.ServiceCommandException]
{
$Localization.WindowsBroken
exit
}
[array]$notRunning = $services | Where-Object -FilterScript {$_.Status -ne "running"}
[array]$notRunning = $Services | Where-Object -FilterScript {$_.Status -ne "running"}
$Script:DefenderServices = $notRunning.Count -eq 0
# Specifies whether Antispyware protection is enabled

Loading…
Cancel
Save