Azure 有没有办法强制Invoke-DscResource cmdlet?

Azure 有没有办法强制Invoke-DscResource cmdlet?,azure,powershell,powershell-2.0,dsc,pester,Azure,Powershell,Powershell 2.0,Dsc,Pester,我正在尝试在一系列测试(使用Pester)中使用Invoke-DscResource cmdlet,以查看配置是否已成功应用于VM 这可以工作9/10次,但有时会引发以下错误: ==> azure-arm.dsc_node: Cannot invoke the Invoke-DscResource cmdlet. The Consistency Check or Pull cmdlet is in progress and must return ==> azure-arm.dsc_

我正在尝试在一系列测试(使用Pester)中使用Invoke-DscResource cmdlet,以查看配置是否已成功应用于VM

这可以工作9/10次,但有时会引发以下错误:

==> azure-arm.dsc_node: Cannot invoke the Invoke-DscResource cmdlet. The Consistency Check or Pull cmdlet is in progress and must return
==> azure-arm.dsc_node: before Invoke-DscResource can be invoked. Use -Force option if that is available to cancel the current operation.
==> azure-arm.dsc_node:     + CategoryInfo          : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
==> azure-arm.dsc_node:     + FullyQualifiedErrorId : MI RESULT 1
==> azure-arm.dsc_node:     + PSComputerName        : localhost

有没有办法强制Invoke-DscResource cmdlet?

问题在于,当另一个进程正在更改计算机的配置时,所需的状态配置无法同时运行

我猜您正在测试的过程完成之前运行Invoke DscResource


尝试暂停测试。

配置完全应用后,我将从Azure automation帐户注销VM。是否有办法暂停LCM,以便在测试中运行Invoke DSCRSource?