Windows Defender Feature / Windows Defender ANtivirus

Duchemin, Dominique 2,006 Reputation points
2022-08-16T06:05:24.757+00:00

Hello,

I have in Windows Server 2016:

Get-WindowsOptionalFeature -Online -FeatureName "Windows-Defender*" | Format-Table

Enable-WindowsOptionalFeature -Online -FeatureName "Windows-Defender-Features" -NoRestart
Enable-WindowsOptionalFeature -Online -FeatureName "Windows-Defender" -NoRestart
Get-WindowsOptionalFeature -Online -FeatureName "Windows-Defender*" | Format-Table

what is the equivalent in Windows Server 2019:

Get-WindowsOptionalFeature -Online -FeatureName "Windows-Defender*" | Format-Table

Enable-WindowsOptionalFeature -Online -FeatureName "Windows-Defender-Antivirus" -NoRestart
Get-WindowsOptionalFeature -Online -FeatureName "Windows-Defender*" | Format-Table

Is this correct? I am getting an error...

Enable-WindowsOptionalFeature : Feature name Windows-Defender-Antivirus is unknown.
At line:2 char:1

  • Enable-WindowsOptionalFeature -Online -FeatureName "Windows-Defender- ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMExcept
    ion
  • FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand

Thanks,
Dom

Windows for business | Windows Server | User experience | PowerShell
Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Amol Shelar 431 Reputation points
    2022-08-16T13:16:32.48+00:00

    @Duchemin, Dominique

    Can you run the below command in Powershell & share output with us.

    Get-Service Windefend, SecurityHealthService, wscsvc| Select Name,DisplayName, Status

    _AmolShelar

    1 person found this answer helpful.
    0 comments No comments

  2. Duchemin, Dominique 2,006 Reputation points
    2022-08-16T06:12:30.76+00:00

    Hello,

    May be this is the version Server 2019:

    Get-WindowsOptionalFeature -Online -FeatureName "Windows-Defender*" | Format-Table
    Enable-WindowsOptionalFeature -Online -FeatureName "Windows-Defender" -NoRestart
    Get-WindowsOptionalFeature -Online -FeatureName "Windows-Defender*" | Format-Table

    Let me know

    Thanks,
    Dom

    0 comments No comments

  3. Duchemin, Dominique 2,006 Reputation points
    2022-08-16T15:51:11.463+00:00

    Hello,

    This is the result:

    PS C:\Windows\system32> Get-Service Windefend, SecurityHealthService, wscsvc| Select Name,DisplayName, Status
    Get-Service : Cannot find any service with service name 'SecurityHealthService'.
    At line:1 char:1

    • Get-Service Windefend, SecurityHealthService, wscsvc| Select Name,Dis ...
    • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : ObjectNotFound: (SecurityHealthService:String) [Get-Service]
      , ServiceCommandException
    • FullyQualifiedErrorId : NoServiceFoundForGivenName,Microsoft.PowerShell.Commands.Get
      ServiceCommand

    Get-Service : Cannot find any service with service name 'wscsvc'.
    At line:1 char:1

    • Get-Service Windefend, SecurityHealthService, wscsvc| Select Name,Dis ...
    • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : ObjectNotFound: (wscsvc:String) [Get-Service], ServiceComman
      dException
    • FullyQualifiedErrorId : NoServiceFoundForGivenName,Microsoft.PowerShell.Commands.Get
      ServiceCommand

    Name DisplayName Status


    Windefend Windows Defender Service Running

    PS C:\Windows\system32>

    Thanks,
    Dom

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.