我的 LocalConfigurationManager 设置如下:
[DSCLocalConfigurationManager()]
Configuration LCMConfig
{
Node localhost
{
Settings
{
RebootNodeIfNeeded = $true
ActionAfterReboot = 'ContinueConfiguration'
AllowModuleOverwrite = $true
DebugMode = 'All'
}
}
}
LCMConfig
Set-DscLocalConfigurationManager -Path .\LCMConfig -Verbose -Force
然后我通过以下方式启动 DSC 配置
Start-DscConfiguration -Path .\RDS -Verbose -Wait
此配置设置了一个 RemoteApp 服务器,该服务器涉及一大堆步骤和几次重新启动。其中一次重新启动正在一次又一次地循环中发生。当重新启动发生时,我可以进入系统足够长的时间以在 DSC 再次重新启动系统之前运行一两个快速命令。如何判断 DSC 挂断的配置中的特定资源。
如果我跑
Remove-DSCConfiguration -Stage Pending,Current,Previous
重新启动停止...但是我似乎丢失了有关问题发生位置的所有信息。
我可以捕获 Get-DSCConfiguration 的输出,但我无法充分了解输出以判断重启循环发生的位置。
我该如何进一步调试呢?