Search and export all Logon Names in an entire Forest

VIET DANG 21 Reputation points
2021-09-14T06:06:29.75+00:00

Hi All,

I would like to extract all logon names for all our users globally in all Forests.
Found some PS scripts here but they do not give me the results I need
Alot of sAMAccountNames tied to user accounts are missing,

TKIA

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,808 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,346 questions
0 comments No comments
{count} votes

Accepted answer
  1. Rich Matheisen 44,621 Reputation points
    2021-09-14T14:33:47.123+00:00

    Assuming you can access the other forests, you'll have to use a Global Catalog server in each forest to get that information. Or you can query a Domain Controller in each domain of each forest.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. VIET DANG 21 Reputation points
    2021-10-19T23:45:03.243+00:00

    Thanks Rich!

    0 comments No comments