Box 1: Configuration -
Configuration Example:
Configuration Sample -
{
Node localhost, server02 -
{
Box 2: WindowsFeature -
Example:
WindowsFeature RoleExample -
{
Ensure = "Present"
# Alternatively, to ensure the role is uninstalled, set Ensure to "Absent"
Name = "Web-Server" # Use the Name property from Get-WindowsFeature
}
The WindowsFeature resource in Windows PowerShell Desired State Configuration (DSC) provides a mechanism to ensure that roles and features are added or removed on a target node.
Reference:
https://docs.microsoft.com/en-us/powershell/dsc/reference/resources/windows/windowsfeatureresource
https://docs.microsoft.com/en-us/powershell/dsc/managing-nodes/apply-get-test