Sha256: e6a2f4ffd147bfa9f3b48124aebae43928add212c846dbf01291316e4ea774fa

Contents?: true

Size: 893 Bytes

Versions: 7

Compression:

Stored size: 893 Bytes

Contents

#! /usr/bin/env ruby
#
#   powershell_helper.rb
#
# DESCRIPTION:
#   This is meant to execute powershell in the bin/powershell deirectory
#   so we don't have to copy the code out of the GEM. This is meant only as a
#   wrapper.
#
# OUTPUT:
#   N/A
#
# PLATFORMS:
#   Windows
#
# DEPENDENCIES:
#   None
#
# USAGE:
#   C:\opt\sensu\embedded\bin\ruby C:\opt\sensu\embedded\bin\powershell_helper <poweshell-script> ARGS
#
# NOTES:
#
# LICENSE:
#   Copyright 2018 <dasecretzofwar@gmail.com>
#   Released under the same terms as Sensu (the MIT license); see LICENSE for details.
#

if ARGV.empty?
  puts 'You must specify arguments for powershell file'
  exit 2
end

powershell_dir = File.expand_path('./powershell', File.dirname(__FILE__))
command = "Powershell.exe -NonInteractive -NoProfile -ExecutionPolicy Bypass -NoLogo -File #{File.expand_path(ARGV.join(' '), powershell_dir)}"
exec command

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sensu-plugins-windows-2.9.1 bin/powershell_helper.rb
sensu-plugins-windows-2.9.0 bin/powershell_helper.rb
sensu-plugins-windows-2.8.1 bin/powershell_helper.rb
sensu-plugins-windows-2.8.0 bin/powershell_helper.rb
sensu-plugins-windows-2.7.0 bin/powershell_helper.rb
sensu-plugins-windows-2.6.0 bin/powershell_helper.rb
sensu-plugins-windows-2.5.0 bin/powershell_helper.rb