Dmitry Nefedov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
3 deletions
-
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
|
@ -273,13 +273,14 @@ function Checks |
|
|
# Checking services |
|
|
# Checking services |
|
|
try |
|
|
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 |
|
|
$Localization.WindowsBroken |
|
|
exit |
|
|
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 |
|
|
$Script:DefenderServices = $notRunning.Count -eq 0 |
|
|
|
|
|
|
|
|
# Specifies whether Antispyware protection is enabled |
|
|
# Specifies whether Antispyware protection is enabled |
|
|