Inspec powershell for Windows

Hello, I need to execute powershell commands using inspec code.

I tried with this:

get-service themes

But on the final EOH it says: Use meaningful heredoc delimiters. (convention:Naming/HeredocDelimiterNaming)

I dont know what to do, Almost tried rubocop -a, rubocop -D but doesn't work.

I hope you can help me, thanks.

There's nothing wrong with your code, but if using rubocop it will complain because it wants a more meaningful name than EOH:

If you change it to something like

script = <<-POWERSHELL
get-service themese

or basically anything other than EOH/EOF it will pass. I would strongly suggest instead you use cookstyle instead of rubocop ( or get used to adding things to ignore in your .rubocop.yml file. (The cookstyle linter already disables most rubocops that don't make sense for cookbook writing)