Box 1: = @("SMTP-Server", "Web-Server")
The following configuration ensures that the Web-Server (IIS) and SMTP (email) Server features, and all subfeatures of each, are installed. configuration FeatureSetTest
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
Node localhost -
{
WindowsFeatureSet WindowsFeatureSetExample
{
Name = @("SMTP-Server", "Web-Server")
Ensure = 'Present'
IncludeAllSubFeature = $true -
}
}
}
Box 2: Ensure -
Ensure indicates whether the roles or features are added. To ensure that the roles or features are added, set this property to Present. To ensure that the roles or features are removed, set the property to Absent. The default value is Present.
Reference:
https://docs.microsoft.com/en-us/powershell/dsc/reference/resources/windows/windowsFeatureSetResource