xml - GPO 使用 XML 报告缺失数据
问题描述
我在 XML 输出中寻找“网络访问:允许匿名 SID/名称翻译”,它不在文件中,但它存在于 HTML 版本中。有解决办法吗?
Get-GPOReport -All -ReportType xml -Path .\master.xml
$master = Get-Content .\master.xml
$master -match 'transla'
<q1:Name>Use online translation dictionaries</q1:Name>
<q1:Explain>This policy setting allows you to prevent online dictionaries from being used for the translation of text through
the Research pane.
If you enable or do not configure this policy setting, the online dictionaries can be used to translate text through the Research pane.
If you disable this policy setting, the online dictionaries cannot be used to translate text through the Research pane.</q1:Explain>
使用 HTML 时我得到多个结果
Get-GPOReport -All -ReportType html -Path .\master.html
$masterHTML = Get-Content .\master.html
$masterHTML -match 'transla'
<tr><td>Network access: Allow anonymous SID/Name translation</td><td>Disabled</td></tr>
<tr><td>Network access: Allow anonymous SID/Name translation</td><td>Disabled</td></tr>
<tr><td>Network access: Allow anonymous SID/Name translation</td><td>Disabled</td></tr>
<tr><td>Network access: Allow anonymous SID/Name translation</td><td>Disabled</td></tr>
<tr><td><span class="explainlink" tabindex="0" onkeypress="javascript:showExplainText(this); return false;" onclick="javascript:showExpl
ainText(this); return false;" gpmc_settingName="Use online translation dictionaries" gpmc_settingPath="User Configuration/Administrative
Templates/Microsoft Word 2016/Miscellaneous" gpmc_settingDescription="This policy setting allows you to prevent online dictionaries fro
m being used for the translation of text through the Research pane.<br/><br/>If you enable or do not configure this policy s
etting, the online dictionaries can be used to translate text through the Research pane.<br/><br/>If you disable this policy
setting, the online dictionaries cannot be used to translate text through the Research pane." gpmc_supported="At least Windows Server 2
008 R2 or Windows 7">Use online translation dictionaries</span></td><td>Disabled</td><td></td></tr>
<tr><td>Network access: Allow anonymous SID/Name translation</td><td>Disabled</td></tr>
<tr><td>Network access: Allow anonymous SID/Name translation</td><td>Disabled</td></tr>
<tr><td>Network access: Allow anonymous SID/Name translation</td><td>Disabled</td></tr>
解决方案
您会发现名为 LSAAnonymousNameLookup 的“网络访问:允许匿名 SID/名称翻译”,因此请尝试
[xml]$gpor = Get-GPOReport -Name "My Group Policy Object" -ReportType Xml
$gpor.GPO.Computer.ExtensionData.Extension.SecurityOptions | Where-Object { $_.SystemAccessPolicyName -eq 'LSAAnonymousNameLookup' }
推荐阅读
- phpunit - 我收到“”ErrorException:使用未定义的常量 SYSTEM_COUNTRY_ID - 假定为“SYSTEM_COUNTRY_ID””
- cucumber - 如何从黄瓜终端为黄瓜选项设置多个插件?
- php - 如何解决此错误尝试在 createProduct 刀片文件中获取非对象的属性“id”?
- php - 如何在codeigniter模型中访问result_array()while循环变量?
- jquery - 用户单击按钮时Jquery切换css?
- asp.net-mvc - 视觉工作室 2017 中的 mvc
- java - 如何动态更改回收站视图元素的高度?
- mongodb - Golang mongodb 字段级加密
- swift - Swift:对 Wordpress 的 REST 调用进行身份验证
- angular - Angular 日历和不完整的渲染