distortedvision
Well-Known Member
- Joined
- Jun 18, 2022
- Messages
- 61
Set-Service -Name WinDefend -StartupType Automatic
Start-Service -Name WinDefend
Set-Service -Name WdNisSvc -StartupType Manual
Start-Service -Name WdNisSvc
Set-Service -Name SecurityHealthService -StartupType Automatic
Start-Service -Name SecurityHealthService
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableAntiVirus /f
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v
reg delete "HKLM\SOFTWARE\Microsoft\Windows Defender" /v PassiveMode /f
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Advanced Threat Protection" /v ForceDefenderPassiveMode /f
gpupdate /force
PS C:\users\[edited out]\desktop> .\Fix.ps1
Set-Service : Service 'Microsoft Defender Antivirus Service (WinDefend)' cannot be configured due to the following
error: Access is denied
At C:\users\[edited out]\desktop\Fix.ps1:1 char:1
+ Set-Service -Name WinDefend -StartupType Automatic
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (System.ServiceProcess.ServiceController:ServiceController) [Set-Servi
ce], ServiceCommandException
+ FullyQualifiedErrorId : CouldNotSetService,Microsoft.PowerShell.Commands.SetServiceCommand
Start-Service : Service 'Microsoft Defender Antivirus Service (WinDefend)' cannot be started due to the following
error: Cannot start service WinDefend on computer '.'.
At C:\users\[edited out]\desktop\Fix.ps1:2 char:1
+ Start-Service -Name WinDefend
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service],
ServiceCommandException
+ FullyQualifiedErrorId : CouldNotStartService,Microsoft.PowerShell.Commands.StartServiceCommand
Set-Service : Service 'Microsoft Defender Antivirus Network Inspection Service (WdNisSvc)' cannot be configured due to
the following error: Access is denied
At C:\users\[edited out]\desktop\Fix.ps1:3 char:1
+ Set-Service -Name WdNisSvc -StartupType Manual
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (System.ServiceProcess.ServiceController:ServiceController) [Set-Servi
ce], ServiceCommandException
+ FullyQualifiedErrorId : CouldNotSetService,Microsoft.PowerShell.Commands.SetServiceCommand
Start-Service : Service 'Microsoft Defender Antivirus Network Inspection Service (WdNisSvc)' cannot be started due to
the following error: Cannot start service WdNisSvc on computer '.'.
At C:\users\[edited out]\desktop\Fix.ps1:4 char:1
+ Start-Service -Name WdNisSvc
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service],
ServiceCommandException
+ FullyQualifiedErrorId : CouldNotStartService,Microsoft.PowerShell.Commands.StartServiceCommand
Set-Service : Service 'Windows Security Service (SecurityHealthService)' cannot be configured due to the following
error: Access is denied
At C:\users\[edited out]\desktop\Fix.ps1:5 char:1
+ Set-Service -Name SecurityHealthService -StartupType Automatic
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (System.ServiceProcess.ServiceController:ServiceController) [Set-Servi
ce], ServiceCommandException
+ FullyQualifiedErrorId : CouldNotSetService,Microsoft.PowerShell.Commands.SetServiceCommand
ERROR: The system was unable to find the specified registry key or value.
ERROR: Invalid syntax.
Type "REG DELETE /?" for usage.
ERROR: Access is denied.
ERROR: The system was unable to find the specified registry key or value.
Updating policy...
Computer Policy update has completed successfully.
User Policy update has completed successfully.