如何生成具有空属性的 Active Directory 用户列表

以下是使用 Windows PowerShell 的 Get-ADUser cmdlet 与 ADManager Plus 生成具有空属性的 AD 用户报告所需步骤的比较。

Windows PowerShell

使用 PowerShell 获取具有空属性的 AD 用户列表的步骤:

  • 选择要生成报告的域。
  • 选择将用作生成报告参数的 LDAP 过滤器。
  • 在 Properties 参数中,指定应在报告中显示的其他用户对象属性。
  • 确定要导出报告的格式。
  • 仔细检查编写脚本时是否遵循了正确的语法。
  • 使用 Windows PowerShell 编译并执行脚本。
  • 若要以不同格式生成报告或向报告添加其他属性,请相应修改脚本。

示例脚本:

 已复制
Get-ADUser -LDAPFilter '(!(telephoneNumber=*))'| Select sAMAccountName, givenName | export-csv -path c:\Scripts\Emptyattrib.csv
点击复制整个脚本

ADManager Plus

获取报告的步骤:

  • User Reports 部分的 General Reports 列中选择 Users with Empty Attributes 报告。
  • 选择 DomainOU。选择要检查的属性,然后点击 Generate
  • 使用 Add/Remove columns 添加报告中用户的其他属性。使用 Export As 选项将报告导出为以下格式之一:CSV、PDF、XLSX、HTML 或 CSVDE。

截图

» 开始 30 天免费试用

在 Active Directory (AD) 中,Get-ADUser cmdlet 使用筛选器执行对 AD 数据库的域范围搜索,以检索具有空属性的用户。然而,使用 Get-ADUser cmdlet 生成具有空属性的 AD 用户列表可能是一项困难的任务,因为:

  • 细微的语法错误或拼写错误可能导致执行失败。
  • 即使是向报告添加细节——例如添加额外属性——也需要修改脚本并重新执行,这非常耗时。
  • 以特定格式导出报告需要相应修改脚本,这增加了脚本的复杂性。
  • 这些脚本的故障排除需要广泛的 AD 和脚本编写专业知识。
  • 这些脚本只能在具有 Active Directory Domain Services 角色的计算机上执行。

Therefore, a better and easier way to generate AD reports is by using ADManager Plus, an Active Directory management and reporting tool. ADManager Plus is a web-based solution for all your AD, Exchange, Skype for Business, Google Workspace, and Office 365 management needs. It simplifies several routine tasks such as provisioning users, cleaning up dormant accounts, managing NTFS and share permissions, and more. Besides reporting, you can also build a custom workflow structure that will assist you in ticketing and compliance, automate routine AD tasks such as user provisioning and de-provisioning, and more. Download a free trial today to explore all these features.

使用 ADManager Plus 生成 AD 报告的亮点

ADManager Plus 通过以下方式简化 AD 报告流程:

  • 提供无脚本报告。
  • 提供超过 150 个预置 AD 报告,涵盖所有 AD 对象的最重要信息。
  • 允许您使用自定义报告功能创建自己的报告。
  • 允许您使用 report scheduler 自动生成报告。您还可以选择通过电子邮件发送这些报告或将其存储在特定位置。
  • 使您能够在报告中即时执行管理任务。例如,对 inactive users reports 中生成的非活动用户执行删除、禁用、移动等操作。

无需 PowerShell 脚本即可计划和导出 AD 用户报告。

  获取 30 天免费试用。

开始您的 无脚本 AD 管理,报告和 自动化之旅 使用 ADManager Plus。

  •  
     
  • 提交即表示您同意根据 隐私政策 处理个人数据。

谢谢

您的下载将在 15 秒内自动开始。如未开始,点击此处手动下载。

相关 Powershell 操作指南:

Active Directory 管理和报告的一站式解决方案

电子邮件下载链接 Email the ADManager Plus download link