Module: Chef::Mixin::PowershellExec

Included in:
DSL::Universal
Defined in:
lib/chef/mixin/powershell_exec.rb

Instance Method Summary collapse

Instance Method Details

#powershell_exec(script) ⇒ Chef::PowerShell

Run a command under PowerShell via a managed (.NET) COM interop API. This implementation requires the managed dll to be registered on the target machine.

Requires: .NET Framework 4.0 or higher on the target machine.

Parameters:

  • script (String)

    script to run

Returns:



100
101
102
# File 'lib/chef/mixin/powershell_exec.rb', line 100

def powershell_exec(script)
  Chef::PowerShell.new(script)
end