【问题标题】:Why are LCM members missing from Get-DscLocalConfigurationManager result?为什么 Get-DscLocalConfigurationManager 结果中缺少 LCM 成员?
【发布时间】:2017-08-17 00:00:04
【问题描述】:

我有两台不同的 Windows Server 2012 R2 机器(建于不同时间),我想在我的 PS 脚本中检查 LCM 状态。

一个服务器从Get-DscLocalConfigurationManager 返回LCMState,另一个不返回 LCMState 或任何其他 LCM 成员。

这是由于 WMF 的旧版本造成的吗?

我查看了https://serverfault.com/questions/627386/what-version-of-windows-management-framework-is-installed,但两台服务器报告的 PSVersion 相同。

在新的工作服务器上:

PS C:\> Get-DscLocalConfigurationManager

ActionAfterReboot              : ContinueConfiguration
AllowModuleOverwrite           : False
CertificateID                  :
ConfigurationID                :
ConfigurationMode              : ApplyAndMonitor
ConfigurationModeFrequencyMins : 15
Credential                     :
DebugMode                      : {NONE}
DownloadManagerCustomData      :
DownloadManagerName            :
LCMCompatibleVersions          : {1.0}
LCMState                       : Idle
LCMVersion                     : 1.0
RebootNodeIfNeeded             : False
RefreshFrequencyMins           : 30
RefreshMode                    : PUSH
PSComputerName                 :

PS C:\> (get-module PSDesiredStateConfiguration).Version

Major  Minor  Build  Revision
-----  -----  -----  --------
1      0      -1     -1

PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      4.0
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.42000
BuildVersion                   6.3.9600.18728
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion      2.2

在较旧的服务器上,LCM 成员不存在:

PS C:\> Get-DscLocalConfigurationManager


AllowModuleOverwrite           : False
CertificateID                  :
ConfigurationID                :
ConfigurationMode              : ApplyAndMonitor
ConfigurationModeFrequencyMins : 30
Credential                     :
DownloadManagerCustomData      :
DownloadManagerName            :
RebootNodeIfNeeded             : False
RefreshFrequencyMins           : 15
RefreshMode                    : PUSH
PSComputerName                 :

PS C:\> (Get-Module PSDesiredStateConfiguration).Version

Major  Minor  Build  Revision
-----  -----  -----  --------
1      0      -1     -1

PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      4.0
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.34003
BuildVersion                   6.3.9600.16394
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion      2.2

如何获取旧服务器上的 LCM 状态?

【问题讨论】:

    标签: powershell dsc


    【解决方案1】:

    您在第一个系统 (6.3.9600.18728) 上有不同的构建。 WMF 4.0 于 2014 年 11 月进行了更新,其中引入了其中一些。所以,第二个系统不见了KB3000850

    【讨论】:

    • 我按照您提供给 KB3000850 的链接尝试下载 Win Server 2012 R2 的独立更新包。它可以让我下载 msu 文件,但这些似乎只适用于 Win8.1。所以我收到消息“更新不适用于您的计算机”并且无法安装。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-06-07
    • 1970-01-01
    • 2016-06-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-11
    相关资源
    最近更新 更多