Enable-SecurityPolicy

Enables predefined security group policies.

Syntax

Enable-SecurityPolicy
      [-AllPolicy]
Enable-SecurityPolicy
      -Policy <String[]>

Description

The Enable-SecurityPolicy cmdlet enables pre-defined group policies for security features. The cmdlet enables group policies for Windows Defender, Windows Update, and Windows Firewall.

Examples

Example 1: Enable predefined security group policies

PS C:\> Enable-SecurityPolicy -Policy "WindowsUpdate"

This command enables the security group policy for Windows Update.

Parameters

-AllPolicy

Indicates that the cmdlet enables all pre-defined group policies for Windows Update, Windows Firewall, and Windows Defender.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Policy

Specifies an array of group policies to enable. The acceptable values for this parameter are:

  • WindowsUpdate
  • Firewall
  • WindowsDefender
Type:String[]
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False