密钥 (validcommunities-validcommunity--key) Key (microsoft-windows-snmp-agent-service-validcommunities-validcommunity-key)

Key 指定 SNMP 社区的唯一键。Key specifies a unique key for an SNMP community.

注意Note
Key 的值作为 ValidCommunity元素的属性添加到答案文件中。The value for Key is added to the answer file as an attribute of the ValidCommunity element. 特性 wcm:keyValue 用于标识 ValidCommunity 的多个列表项类型。The attribute wcm:keyValue is used to identify multiple list item types of ValidCommunity. 例如,你可以使用值 123 指定三个不同的团体。For example, you can specify three different communities, by using the Key values of 1, 2, and 3.

在 windows server 2008、Windows Server 2008 R2 和 Windows Server 2012 的核心安装中,可以通过在 Windows Foundation 程序包中启用 " SNMP-SC " 来使用此设置。You can use this setting in core installations of Windows Server 2008, Windows Server 2008 R2, and Windows Server 2012, by enabling SNMP-SC in the Windows Foundation package.

Values

KeyKey

指定社区的唯一键。Specifies a unique key for the community. Key 是一个字符串。Key is a string.

有效的配置阶段Valid Configuration Passes

generalizegeneralize

specializespecialize

父层次结构Parent Hierarchy

Microsoft WINDOWS SNMP-代理服务 | ValidCommunities | ValidCommunity | Microsoft-Windows-SNMP-Agent-Service | ValidCommunities | ValidCommunity | Key

适用于Applies To

有关此组件支持的 Windows 版本和体系结构的列表,请参阅 Microsoft WINDOWS SNMP 代理服务For the list of the supported Windows editions and architectures that this component supports, see Microsoft-Windows-SNMP-Agent-Service.

XML 示例XML Example

以下 XML 示例输出显示了如何设置 SNMP。The following XML sample output shows how to set SNMP.

<PermittedManagers>
   <A1>networkhost</A1>
</PermittedManagers>
<RFC1156Agent>
   <sysContact>MyContact</sysContact>
   <sysLocation>MyLocation</sysLocation>
   <sysServices>65</sysServices>
</RFC1156Agent>
<TrapConfiguration>
   <TrapConfigurationItems wcm:action="add">
      <Community_Name>Private</Community_Name>
      <Traps>ComputerName</Traps>
   </TrapConfigurationItems>
   <TrapConfigurationItems wcm:action="add">
      <Community_Name>Public</Community_Name>
      <Traps>207.46.197.32</Traps>
   </TrapConfigurationItems>
</TrapConfiguration>
<ValidCommunities>
   <ValidCommunity wcm:action="add" wcm:keyValue="Community1">2</ValidCommunity>
   <ValidCommunity wcm:action="add" wcm:keyValue="Community2">4</ValidCommunity>
</ValidCommunities>

ValidCommunityValidCommunity