PowerShell中使用FSRM的名称空间无效

时间:2016-12-02 16:02:55

标签: powershell namespaces

尝试PS命令:

Set-FsrmFileGroup -Name "Anti-Ransomware File Groups" -IncludePattern @((Invoke-WebRequest -Uri "https://fsrm.experiant.ca/api/v1/combined" -UseBasicParsing).Content | ConvertFrom-Json | % {$_.filters})

获取错误:

New-FsrmFileGroup : Invalid namespace
At line:1 char:1
+ New-FsrmFileGroup -Name "Anti-Ransomware File Groups" -IncludePattern @((Invoke- ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : MetadataError: (MSFT_FSRMFileGroup:Root/Microsoft/...T_FSRMFileGroup) [New-FsrmFileGroup], CimException
    + FullyQualifiedErrorId : HRESULT 0x8004100e,New-FsrmFileGroup

我还注意到FSRM中的一些错误:

errors

防火墙关闭,我是域管理员,以管理员身份运行它。证监会和WMI修复恢复良好。我将根据指南(https://fsrm.experiant.ca/)。这已经在很多其他服务器上运行,因此我不相信命令格式不正确。

Get-WmiObject -Namespace 'Root/Microsoft/Windows/Fsrm' -List的输出:

Get-WmiObject : Could not get objects from namespace Root/Microsoft/Windows/Fsrm.
Invalid namespace
At line:1 char:1
+ Get-WmiObject -Namespace 'Root/Microsoft/Windows/Fsrm' -List
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : INVALID_NAMESPACE_IDENTIFIER,Microsoft.PowerShell.Commands.G‌​etWmiObjectCommand

0 个答案:

没有答案