繁体   English   中英

Powershell DSC挂起

[英]Powershell DSC Hangs

因此,这是我的问题,我正在尝试使用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/

但无济于事...

我错过了一些基本配置来正确运行这些东西吗? 有人遇到过这个问题吗?

在此处输入图片说明

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的正确参数是什么

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM