I have powershell 4 and would like to install selective windows features for example only install File Server FS-FileServer and File Server Resource Manager FS-Resource-Manager.
[X] File and Storage Services FileAndStorage-Services Installed [X] File Server FS-FileServer Installed [X] File Server Resource Manager FS-Resource-Manager Installed
for this my sample code looks like this
Configuration JSwebDeploy2
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
node "localhost"
{
WindowsFeature FS-FileServer
{
Name = "FS-FileServer"
Ensure = 'Present'
}
WindowsFeature FS-Resource-Manager
{
Name = "FS-Resource-Manager"
Ensure = 'Present'
}
}
}
JSwebDeploy2
Is this the correct way to go about doing with or is there a way to group all sub features together. I came across WindowsFeatureSet but that is only avaliable in Powershell 5.0 onward.