question: what's the proper way to run inspec under Windows?
I'm getting the error at the Stacktrace section when I'm running inspec from powershell.
InSpec and Platform Version
inspec --version
3.9.0
Windows 10
Replication Case
run inspec from a powershell terminal
Stacktrace
inspec : Cannot process the XML from the 'Error' stream of 'c:\opscode\inspec\bin\inspec.bat': Root element is missing.
At C:\jenkins\workspace\windows\3_test.ps1:18 char:1
Hi,
just to provide additional info about this error,...
I got exactly the same error message using PowerShell to invoke inspec.
I usually need to connect to a server with inspec so I need to use the param -t winrm://... and this error never happens.
But with my first script without -t parameter inspec generated this error.
Using the same script but adding -t parameter (just for testing because it is not required) the error message goes away.
Using the same script with and without -t parameter in a CMD console the error is not generated.
In all cases, the tests included in script are executed correctly an I get the required report.
This is the error message:
inspec : Cannot process the XML from the 'Error' stream of 'C:\***\inspec\bin\inspec.bat': Root element is missing.
At C:\***\durable-1eadfe49\powershellScript.ps1:1 char:1
+ inspec exec c:\***/cor ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SyntaxError: (C:\***\inspec\bin\inspec.bat:String) [], XmlException
+ FullyQualifiedErrorId : ProcessStreamReader_CliXmlError