Windows 通过puppet模块导入注册表文件的静默方式

Windows 通过puppet模块导入注册表文件的静默方式,windows,powershell,puppet,Windows,Powershell,Puppet,我有一组.reg文件需要通过puppet导入。我看到了puppetlabs注册表模块,但无法导入.reg文件。有没有办法通过puppet静默导入.reg文件?regedit.exe有一个用于静默导入注册表文件的/s。通过导入文件 $file='C:\path\to\your.reg' exec{“导入$file”: 命令=>“regedit.exe/s$文件”, require=>File[$File], } 或者,您可以使用命令行实用程序,如@AlexK在注释中所建议的: $file = '

我有一组
.reg
文件需要通过puppet导入。我看到了puppetlabs注册表模块,但无法导入
.reg
文件。有没有办法通过puppet静默导入
.reg
文件?

regedit.exe
有一个用于静默导入注册表文件的
/s
。通过导入文件

$file='C:\path\to\your.reg'
exec{“导入$file”:
命令=>“regedit.exe/s$文件”,
require=>File[$File],
}
或者,您可以使用命令行实用程序,如@AlexK在注释中所建议的:

$file = 'C:\path\to\your.reg'
exec { "import $file":
    command => "reg.exe import $file",
    require => File[$file],
}