【问题标题】:PowerShell DSC: The data source could not process the filterPowerShell DSC:数据源无法处理筛选器
【发布时间】:2020-08-05 12:41:03
【问题描述】:

下午!

我在 PowerShell DSC(特别是 Start-DscConfiguration cmdlet)方面遇到了一个问题,试图解决这个问题 2 天,现在我在这里 :)

对于特定的 MOF 文件,我收到以下错误,之前的 MOF 运行良好。

The data source could not process the filter. The filter might be missing or it might be invalid. Change the filter
and try the request again.
    + CategoryInfo          : InvalidArgument: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : HRESULT 0x8033801a

编辑:以前有没有人遇到过这个错误?我可以共享有问题的 MOF 文件,并删除了一些受限信息。 谢谢

【问题讨论】:

    标签: powershell dsc


    【解决方案1】:

    这里的问题不在于 PowerShell DSC,而在于 PowerShell 本身。

    我在 switch 块中有一个 cmdlet。举个例子:

    Switch($item){
      {$_ -eq $true}{do something}
      {$_ -eq $fales}{do something}
    
      get-service -name $item
    }
    

    无法过滤的是 get-service cmdlet。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-10
      • 1970-01-01
      相关资源
      最近更新 更多