【问题标题】:DSC Windows Management Framework 5 Pull ServerDSC Windows 管理框架 5 拉服务器
【发布时间】:2015-03-06 09:42:08
【问题描述】:

我一直在尝试在 Windows Server 2012 R2(服务器和客户端)上设置 DSC 拉取服务器,我刚刚安装了 WMF 5 的 CTP 版本。 我已将客户端 LCM 配置为侦听特定配置的服务器 URL,当尝试强制 LCM 从服务器获取配置并应用它时,我在详细信息下方出现错误。 如何强制 LCM:

    $params = @{
    Namespace = ‘root/Microsoft/Windows/DesiredStateConfiguration’
    ClassName = ‘MSFT_DSCLocalConfigurationManager’
    MethodName = ‘PerformRequiredConfigurationChecks’
    Arguments = @{
    Flags = [uint32]2
    }
    }

    Invoke-CimMethod @params

这是我得到的错误:

Invoke-CimMethod : The requested object could not be found. At C:\PSDSC\DSCForceLCM.ps1:10 char:1
+ Invoke-CimMethod @params
+ ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (root/Microsoft/...gurationManager:String) [Invoke-CimMethod], CimException
    + FullyQualifiedErrorId : MI RESULT 6,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand

【问题讨论】:

  • 您在此处发布的代码示例使用“智能引号”。如果这些实际上在代码中,那么这可能是导致问题的原因。请确认并更新您的代码示例。

标签: server pull dsc


【解决方案1】:

最新的 WMF 5.0 预览版(2 月)有一个 cmdlet Update-DscConfiguration,它将强制 DSC 进行拉取(假设 RefreshMode 设置为拉取)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-09-12
    相关资源
    最近更新 更多