Class: Facter::Util::Parser::PowershellParser
- Defined in:
- lib/facter/util/parser.rb
Overview
Executes and parses the key value output of Powershell scripts
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#parse_results ⇒ Object
Returns a hash of facts from powershell output.
Methods inherited from Base
#content, #initialize, #results
Constructor Details
This class inherits a constructor from Facter::Util::Parser::Base
Instance Method Details
#parse_results ⇒ Object
Returns a hash of facts from powershell output
141 142 143 144 |
# File 'lib/facter/util/parser.rb', line 141 def parse_results shell_command = "powershell -NoProfile -NonInteractive -NoLogo -ExecutionPolicy Bypass -File \"#{filename}\"" KeyValuePairOutputFormat.parse Facter::Core::Execution.exec(shell_command) end |