You could also use powershell_out mixin. There was already a discussion around this here:
The powershell_out is more expensive approach but since you are shelling out you can parse the stderr and return codes.
Either you choose the powershell_exec or the powershell_out you beed to include their proper mixin:
script = <<-EOH
result = powershell_out(script)
In the end this was what produced the result I wanted:
result = powershell_exec("(Get-Item c:\\windows\\system32\\w32time.dll).VersionInfo").result["FileVersion"]
file 'failas' do
Glad to hear you managed to solve the issue.
My comments were regarding general class include. Indeed in the recipe dsl there is no include method, for that you would need to try the approach that I have already posted in this thread: Cant read powershell output to variable
What is new to me that there is no need for the include at all in your case…