因此,我的问题是,我试图使用PS Dsc安装一些基本的软件包,但每当我试图运行我的脚本,它看起来像启动,但从来没有完成。我试着按建议传递-Force参数,但它似乎只是堆叠操作,而这些进程却一直停滞不前。
这是我的剧本
Configuration WebServer {
# Import the module that contains the resources we're using.
Import-DscResource -ModuleName PsDesiredStateConfiguration
Node "localhost" {
Package InstallAspNetWebPages2
{
Ensure = "Present"
Path =
"C:\Users\jryter\Documents\WebServerInstalls\AspNetWebPages2Setup.exe"
Name = "Microsoft ASP.NET Web Pages 2 Runtime"
ProductID = "EA63C5C1-EBBC-477C-9CC7-41454DDFAFF2"
}
}
}
WebServer -OutputPath "C:\DscConfiguration"
Start-DscConfiguration -Wait -Force -verbose -Path "C:\DscConfiguration"当前的LCM状态是它正在执行一致性检查。我试着遵循这个链接-> https://powershell.org/forums/topic/stop-dsc-configuration-which-is-runningstuck/
但没有结果..。
是否有一些基本的配置,我错过了正确运行这些东西?有人有这个问题吗?

发布于 2017-09-14 13:39:40
DSC可能启动了exe,它就坐在那里等待您的输入。您需要为静默安装添加参数。
Package InstallAspNetWebPages2
{
Ensure = "Present"
Path = "path\file.exe"
Name = "Microsoft ASP.NET Web Pages 2 Runtime"
ProductID = "EA63C5C1-EBBC-477C-9CC7-41454DDFAFF2"
Arguments = "/silent" or "/quiet"
}我不知道这个exe的正确论据是什么
https://stackoverflow.com/questions/46220589
复制相似问题