我如何解决“无法调用 SendConfigurationApply 方法".执行 Start-DscConfiguration 时? [英] How do I resolve "Cannot invoke the SendConfigurationApply method." when performing Start-DscConfiguration?

查看:40
本文介绍了我如何解决“无法调用 SendConfigurationApply 方法".执行 Start-DscConfiguration 时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个 DSC 配置,我现在正在对其进行迭代,并且正在添加我出错的新包配置.我确定忘记向 Package 块中的 MSI 安装程序提供/quiet 参数会导致 Start-DscConfiguration cmdlet挂起".

I've created a DSC configuration that I'm iterating on right now, and I am adding new Package configuration which I've gotten wrong. I determined that by forgetting to supply the /quiet argument to an MSI installer in a Package block I can cause the Start-DscConfiguration cmdlet to 'hang'.

在此挂起"开始时,我停止了本地计算机上的 DSC 配置操作并尝试更正配置问题(通过在我的示例中添加/quiet 参数),然后我重新启动 DSC 操作.现在我在操作过程中看到我的远程机器的以下内容:

At the onset of this 'hang' I stop the DSC configuration operation on my local machine and attempt to correct the configuration problem (by adding the /quiet argument in my example) then I restart the DSC operation. Now I am seeing the following for my remote machines during the operation:

Cannot invoke the SendConfigurationApply method. The PerformRequiredConfigurationChecks method is in progress and must return before SendConfigurationApply can be invoked.
    + CategoryInfo          : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MI RESULT 1
    + PSComputerName        : REMOTEMACHINE20

不幸的是,访问正在配置的远程 PC 我看到了类似的错误消息,并且重新启动 PC 似乎并没有纠正错误.

Unfortunately, visiting the remote PC being configured I see a similar error message, and rebooting the PC doesn't seem to rectify the error.

我在网上看到了一些关于这个问题的帖子,到目前为止我发现的三个建议:

I've seen some posts online regarding this problem, and the three I've found thus far suggest:

  1. 稍等片刻,它会自行解决",这对我不起作用(也许我不耐烦......).不是一个站得住脚的长期解决方案.
  2. 删除所有本地 .mof 文件并重试",这对我也不起作用.
  3. 停止名称中包含 'wmi' 的所有进程并重新启动目标机器上的 winrm 服务. 这让我解除了封锁,但我希望有更好的方法来做到这一点.(如果在接下来的几天里我没有听到更好的方法,我会用这个过程自己回答这个问题以获得所需的结果).
  1. "Just wait a while and it will resolve itself", which hasn't worked for me (maybe I'm impatient...). Not a tenable long-term solution.
  2. "Delete all local .mof files and try again", which hasn't worked for me either.
  3. Stop all processes with 'wmi' in the name and restart the winrm service on the target machine(s). This has gotten me unblocked, but I am hopeful there is a better way to do this. (If I don't hear a better method in the next few days I'll answer this myself with this procedure to get the results required).

推荐答案

您也可以尝试使用 -Force 选项执行 start-dscconfiguration 命令

You could also try executing the start-dscconfiguration command with the -Force option

Start-DscConfiguration -Force ...

这篇关于我如何解决“无法调用 SendConfigurationApply 方法".执行 Start-DscConfiguration 时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆