【发布时间】:2016-04-10 20:40:06
【问题描述】:
我的 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 的输出,但我无法充分理解输出的含义,无法判断重启循环发生在哪里。
如何进一步调试?
【问题讨论】:
标签: powershell windows-server-2012 dsc powershell-5.0