Method: SecurityPolicy#load
- Defined in:
- lib/resources/security_policy.rb
#load ⇒ Object
load security content
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/resources/security_policy.rb', line 26 def load # export the security policy inspec.command('secedit /export /cfg win_secpol.cfg') # store file content command_result ||= inspec.command('type win_secpol.cfg') # delete temp file inspec.command('del win_secpol.cfg') @exit_status = command_result.exit_status.to_i @policy = command_result.stdout @loaded = true # returns self self end |