首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Powershell DSC悬挂

Powershell DSC悬挂
EN

Stack Overflow用户
提问于 2017-09-14 13:33:52
回答 1查看 1.9K关注 0票数 1

因此,我的问题是,我试图使用PS Dsc安装一些基本的软件包,但每当我试图运行我的脚本,它看起来像启动,但从来没有完成。我试着按建议传递-Force参数,但它似乎只是堆叠操作,而这些进程却一直停滞不前。

这是我的剧本

代码语言:javascript
复制
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/

但没有结果..。

是否有一些基本的配置,我错过了正确运行这些东西?有人有这个问题吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-09-14 13:39:40

DSC可能启动了exe,它就坐在那里等待您的输入。您需要为静默安装添加参数。

代码语言:javascript
复制
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的正确论据是什么

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46220589

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档