class Inspec::Resources::PowershellScript

def exist?

we cannot determine if a command exists, because that does not work for scripts
def exist?
  nil
end

def initialize(script)

def initialize(script)
  unless inspec.os.windows?
    return skip_resource 'The `script` resource is not supported on your OS yet.'
  end
  # since WinRM 2.0 and the default use of powershell for local execution in
  # train, we do not need to wrap the script here anymore
  super(script)
end

def strip

Removes leading and trailing whitespace from stdout
def strip
  result.stdout.strip unless result.stdout.nil?
end

def to_s

def to_s
  'Powershell'
end