windows-feature('NET-Framework-Core') not seen as installed


I am writing a cookbook to setup a web server. On the recipe side the windows feature is being installed/verified using DSC using:

# Ensure .NET 2.0, 3.0, 3.5 is installed
dsc_script 'DotNET-Framework' do
  code <<-EOH
  WindowsFeature InstallDotNetFramework
    Name = 'NET-Framework-Core'
    Ensure = 'Present'

I can log in to the test kitchen server after converge and verify that ‘NET-Framework-Core’ is in fact installed. When I run a kitchen verify Inspec tells me that it is not installed.

Inspec comand:

# .NET 3.5, 3.0 and 2.0 Framework installed
describe windows_feature('NET-Framework-Core') do
  it { should be_inistalled }

Error from console:

:heavy_multiplication_x: ‘NET-Framework-Core’ should be inistalled
expected Windows Feature ‘NET-Framework-Core’ to respond to inistalled?

Just in case a gist of the kitchen log is here:
And a gist of the installed feature list from the server:

I am confused on why the feature is not seen as being installed when I know that it is. The error in the Kitchen log isn’t much help to me. Any suggestions are greatly appreciated.


In your inspec, you have a typo.

Try be_installed not be_inistalled.




@Brettski Thank you for posting the question. Here is a version that works on my machine:

describe windows_feature('NET-Framework-Core') do
  it { should be_installed }

describe windows_feature('NET-Framework-45-Core') do
  it { should be_installed }

This results in:

You can always double-check the result with Get-WindowsFeature Cmdlet:


DOH! Very good and thank you. I would be nice of such a thing was picked up by a linter.