diff --git a/lib/resources/powershell.rb b/lib/resources/powershell.rb index 5c875e324..61e2f8078 100644 --- a/lib/resources/powershell.rb +++ b/lib/resources/powershell.rb @@ -36,6 +36,11 @@ module Inspec::Resources nil end + # Removes leading and trailing whitespace from stdout + def strip + result.stdout.strip unless result.stdout.nil? + end + def to_s 'Powershell' end