vbscript 安装在厨师食谱中不起作用

时间:2021-07-24 10:50:37

标签: ruby automation chef-infra wsh cookbook

我无法执行厨师食谱中的 vbscript。

下面是文件文件夹中的配方和所需的vbscript。请告知是否可以使用powershell安装vbscript。

require 'json'
require "chef/mixin/powershell_out"
::Chef::Recipe.send(:include, Chef::Mixin::PowershellOut)

vbscript_path = "c:/script.vbs"
ruby_block "execute vbscript" do
    block do
      begin
        script_install = shell_out("powershell #{vbscript_path} -ExecutionPolicy Bypass")
      end
    end
end

0 个答案:

没有答案
相关问题