Puppet不在Windows 2008服务器上运行PowerShell脚本
我的Windows虚拟机上的Puppet代理没有执行PowerShell脚本。 我用一个非常简单的脚本来testing它。 该脚本作为test.ps1存储在C驱动器上。 其内容如下: "$(Get-Date -format F)" | Out-File C:\z.txt -Encoding ASCII 当我手动从PowerShell控制台运行./test.ps1时,它工作正常,文件z.txt被创build。 但由于某种原因,伪装代理不运行这个。 我的site.pp的内容是: exec { "Run Script": command => 'C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -Executionpolicy Unrestricted -File c:/test.ps1', logoutput => true, refreshonly => true, } 而虚拟机本身的“puppet agent -t”的输出是: C:\Users\Administrator>puppet agent -t Info: Retrieving pluginfacts Warning: Copying owner/mode/group from the source file on Windows is deprecated; use source_permissions […]