The WindowsFeature
DSC resource is based on the Install-WindowsFeature
cmdlet, and is only available on Server.
To enable features on Windows client (i.e. non-Server), you'll need to use the WindowsOptionalFeature resource, which works over DISM.
To enumerate a list of features on your particular version, you can use Get-WindowsOptionalFeature -Online
or DISM from the command line: dism.exe /online /get-features
.
You asked about NET-Framework-45-Core
. This is not a separately installable/removable feature on Windows 10 client, for example.
To identify the DISM features for any particular Windows Server feature, you can look at the results of (Get-WindowsFeature <name>).AdditionalInfo.InstallName
. For example, the DISM feature for NET-Framework-45-Core
is NetFx4
.
Note that while DISM.exe and WindowsOptionalFeature
also work on Windows Server, it is not recommended as the relationships between features in Server is more complicated and those relationships are understood and managed by additional metadata exposed through the *-WindowsFeature cmdlets, as well as Server Manager and a WMI provider. Directly installing the discovered DISM features as described above will not necessarily install all needed or recommended additional components to make the feature work correctly.