我试图使用PowerShell 4.0在Windows 7上安装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时,没有安装localhost.mof文件,而是在文件夹InstallApps中创建
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 05-02-2016 11:35 1292 localhost.mof
[Finished in 2.4s]为什么没有启动安装?
发布于 2016-02-08 17:22:56
我还没有读过你提到的博客,但是运行上面的函数只是创建了mof文件。
为了运行mof文件并执行所需的状态,需要运行。如下所示..。
Start-DscConfiguration -ComputerName TargetMachine -Path GeneratedMofFileLocation -Wait -Verbosehttps://stackoverflow.com/questions/35222011
复制相似问题