I would like to pull a report from AD that lists all user's cn and imrPID from the Attribute Editor tab.

Roark, Steven (external email) 0 Reputation points
2024-05-02T17:20:41.11+00:00

In our domain, People is the name of the OU housing all of our users. Each user has a unique ID assigned other than their User logon name. That unique ID is listed on the Attribute Editor tab as the imrPID. I want to pull a report from the People OU listing all users by their cn (or Display name) and their imrPID. How do I do that?

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,999 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Neuvi Jiang 230 Reputation points Microsoft Vendor
    2024-05-08T06:46:01.12+00:00

    Hi Roark, Steven,

    Thank you for posting in the Q&A Forums.

    To extract a report from the People OU, listing all users by their display name (cn) and unique ID (imrPID), you can use a PowerShell script. Here's an example script:

    powershellCopy code
    
    $domainController = "your_domain_controller_name"
    
    
    Import-Module ActiveDirectory
    
    
    $users = Get-ADUser -Filter * -SearchBase "OU=People,DC=your_domain,DC=com" -Server $domainController
    
    
    foreach ($user in $users) {
        Write-Host "Display Name: $($user.Name), Unique ID: $($user.imrPID)"
    }
    

    Replace "your_domain_controller_name" with the name of your domain controller and "your_domain" with your domain name. This script will output the display name and unique ID for each user. You can redirect the output to a file when running this script to create a report.

    Best regards

    Neuvi Jiang

    0 comments No comments