向新属性中添加值(可选) - Amazon Directory Service
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

向新属性中添加值(可选)

当您已在 Amazon Managed Microsoft AD 目录中创建新属性并且要向该属性中添加新值时,可使用此可选步骤。

向属性中添加值
  1. 打开 PowerShell 命令行实用工具,并使用以下命令设置新属性。在本示例中,我们将向特定计算机的属性添加新的 EC2InstanceID 值。

    PS C:\> set-adcomputer -Identity computer name -add @{example-EC2InstanceID = 'EC2 instance ID'}

  2. 可通过运行以下命令来验证是否已将 EC2InstanceID 值添加至计算机对象:

    PS C:\> get-adcomputer -Identity computer name –Property example-EC2InstanceID