ZCSPM
Windows Server 2012 R2
ZCSPM offers PowerShell scripts for hardening the Windows Server 2012 R2 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_WindowsServer2012_R2_v1_0_0.ps1: ZCSPM can remediate about 152 security policies to harden Windows Server 2012 R2 on an Azure virtual machine for CIS Windows Server 2012 R2 Benchmark.
To harden the Windows Server 2012 R2 OS baseline configuration running on a virtual machine (VM):
- Ensure you have PowerShell version v5 or higher. Verify your PowerShell version using the following command:
PSVersionTable.PSVersion
- 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
- Install the following DSC modules to run PowerShell commands while running a Quick Wins script:
- AuditPolicyDsc
- SecurityPolicyDsc
- NetworkingDsc
- PSDesiredStateConfiguration
Get-InstalledModule -Name <module-name>
Install a required module by running the following command:
Install-Module -Name <module-name>
- Download the script from GitHub using the following command:
wget https://raw.githubusercontent.com/Cloudneeti/os-harderning-scripts/master/WindowsServer2012R2/CIS_Benchmark_WindowsServer2012_R2_v1_0_0.ps1 -O CIS_Benchmark_WindowsServer2012_R2_v1_0_0.ps1
- Run the PowerShell script to compile the DSC modules using the following command:
.\CIS_Benchmark_WindowsServer2012_R2_v1_0_0.ps1
- Apply the baseline configuration to your VM using the following command:
Start-DscConfiguration -Path .\CIS_Benchmark_WindowsServer2012_R2_v1_0_0 -Force -Verbose -Wait