icon-zcspm.svg
ZCSPM

Windows Server 2019

ZCSPM offers PowerShell scripts for hardening the Windows Server 2019 OS on your Microsoft Azure Virtual Machine. Make sure you test the scripts on a testing environment before running them on a production environment.

Hardening Script for CIS Compliance

CIS_Benchmark_WindowsServer2019.ps1: ZCSPM can remediate about 158 security policies to harden Windows Server 2019 on an Azure virtual machine for CIS Windows Server 2019 Benchmark.

  • 1 to 10 of 158. Page 1 of 16
    Close

To harden the Windows Server 2019 OS baseline configuration running on a virtual machine (VM):

  1. Ensure you have PowerShell version v5 or higher. Verify your PowerShell version using the following command:
PSVersionTable.PSVersion
  1. Ensure there are no restrictions on PowerShell to run the script. Remove restrictions on PowerShell using the following command:
Set-ExecutionPolicy `
-Scope Process `
-ExecutionPolicy Bypass
  1. Install the following DSC modules to run PowerShell commands while running a Quick Wins script:
    • AuditPolicyDsc
    • SecurityPolicyDsc
    • NetworkingDsc
    • PSDesiredStateConfiguration
    To verify if a module is already installed, run the following command:
Get-InstalledModule -Name <module-name>

Install a required module by running the following command:

Install-Module -Name <module-name>
  1. Download the script from GitHub using the following command:
wget https://raw.githubusercontent.com/Cloudneeti/os-harderning-scripts/master/WindowsServer2019/CIS_Benchmark_WindowsServer2019_v100.ps1 -O CIS_Benchmark_WindowsServer2019_v100.ps1
  1. Run the PowerShell script to compile the DSC modules using the following command:
.\CIS_Benchmark_WindowsServer2019_v100.ps1
  1. Apply the baseline configuration to your VM using the following command:
Start-DscConfiguration -Path .\CIS_Benchmark_WindowsServer2019_v100  -Force -Verbose -Wait
Related Articles
CentOS Linux 7 OS Hardening Scripts for Azure Virtual MachinesRed Hat Enterprise Linux 7 OS Hardening Scripts for AWS EC2 InstancesUbuntu 18.04 OS Hardening Scripts for Azure Virtual MachinesWindows Server 2019Windows Server 2016Windows Server 2012 R2