Enable-SecurityPolicy
Enable-SecurityPolicy
Enables predefined security group policies.
Syntax
Parameter Set: All
Enable-SecurityPolicy -AllPolicy [ <CommonParameters>]
Parameter Set: Specific
Enable-SecurityPolicy -Policy <String[]> [ <CommonParameters>]
Detailed 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.
Parameters
-AllPolicy
Indicates that the cmdlet enables all pre-defined group policies for Windows Update, Windows Firewall, and Windows Defender.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Policy<String[]>
Specifies an array of group policies to enable. The acceptable values for this parameter are:
-- WindowsUpdate
-- Firewall
-- WindowsDefender
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Enable predefined security group policies
This command enables the security group policy for Windows Update.
PS C:\> Enable-SecurityPolicy -Policy "WindowsUpdate"