【发布时间】:2016-02-09 01:22:56
【问题描述】:
我正在尝试使用 DSC 在 Windows 7 上使用 PowerShell 4.0 安装 Git,基于:
Configuration InstallApps
{
Node localhost
{
Package Git
{
Ensure = "Present"
Name = "Git"
Path = "C:\tmp\Git-2.7.0.2-64-bit.exe"
ProductId = ''
}
}
}
InstallApps
我运行上述脚本的机器上没有安装 Git。
当我运行上面的 git 时,没有安装,而是在文件夹 InstallApps 中创建了一个 localhost.mof 文件:
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 05-02-2016 11:35 1292 localhost.mof
[Finished in 2.4s]
为什么没有触发安装?
【问题讨论】:
标签: git powershell dsc