# 65.014 Windows Server: Get a list of Active Directory users using PowerShell

<div id="bkmrk-symptoms-cyber-prote"><div class="block block-system no-title odd first last block-count-6 block-region-content block-main"><div class="one-column at-panel panel-display clearfix"><div class="centered-section"><div class="region region-one-main"><div class="region-inner clearfix"><div class="panel-pane pane-node-content no-title block"><div class="block-inner clearfix"></div></div></div></div></div></div></div></div><span style="font-size: 12pt;">Browse to OU in Users &amp; Computers</span>

Right-click OU folder and choose properties  
Click on Attribute editor tab and find distinguishedName record  
Double click the record to open it and then copy the contents of the record  
  
Start - PowerShell

Right-click PowerShell and choose run as administrator

Get-ADUser -Filter \* -SearchBase "&lt;REPLACE THIS WITH THE TEXT YOU COPIED&gt;" -Properties \* | Export-Csv "c:\\ADUsers.csv"  
  
The list will be in c:\\ADUsers.csv

<span data-contrast="auto">--------------------------------------------&lt;END OF DOCUMENT&gt; --------------------------------------------</span><span data-ccp-props="{"201341983":0,"335551550":2,"335551620":2,"335559739":160,"335559740":259}"> </span>

<table border="1" id="bkmrk-need-help%3F%C2%A0-get-in-t" style="margin-left: auto; margin-right: auto; width: 71.4432%; height: 153.563px;"><tbody><tr style="height: 22.3906px;"><td style="width: 97.8756%; height: 22.3906px; text-align: center;"><span style="color: rgb(4,121,181);">**Need help? G**</span><span style="color: rgb(4,121,181);">**et in touch!**</span>

</td></tr><tr style="height: 131.172px;"><td style="width: 97.8756%; height: 131.172px;">You can call us on [01752 373000](tel:01752373000), option 2 or, if you are on Number Club, just call extension 3001

You can email us at <hub@safeharboursupport.com>  
  
You can chat &amp; Collaborate with us at [https://kite.wildix.com/nc-a12/3001](https://kite.wildix.com/nc-a12/3001)

You can Whatsapp us right here: [https://wa.me/441752373000](https://wa.me/441752373000)

</td></tr><tr><td style="width: 97.8756%;">![](https://hub.safeharboursupport.com/media/KBImages/safeharbour-logo-colour-nobg-500x140.png)

</td></tr></tbody></table>

**<span data-contrast="auto">Document Control</span>**<span data-ccp-props="{"201341983":0,"335559739":160,"335559740":259}"> </span>

<table aria-rowcount="9" data-tablelook="1696" data-tablestyle="MsoTableGrid" id="bkmrk-document-name%C2%A0-35.01" style="width: 100%;"><tbody><tr aria-rowindex="1"><td data-celllook="0" style="width: 18.5325%;">**<span data-contrast="auto">Document Name</span>**<span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td><td colspan="3" data-celllook="0" style="width: 81.4668%;"><span data-ccp-props="{"201341983":0,"335559740":259}">65.014 Windows Server: Get a list of Active Directory users using PowerShell</span>

</td></tr><tr aria-rowindex="2"><td data-celllook="0" style="width: 18.5325%;">**<span data-contrast="auto">Version</span>**<span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td><td colspan="3" data-celllook="0" style="width: 81.4668%;"><span data-contrast="auto">v1.0 Current</span>

</td></tr><tr aria-rowindex="3"><td data-celllook="0" style="width: 18.5325%;">**<span data-contrast="auto">Author</span>**<span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td><td colspan="3" data-celllook="0" style="width: 81.4668%;"><span data-contrast="auto">Neil Tancock, IT Services (Safeharbour Support Ltd), <neil@safeharboursupport.com></span>

</td></tr><tr aria-rowindex="4"><td data-celllook="0" style="width: 18.5325%;">**<span data-contrast="auto">Approval</span>**<span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td><td colspan="3" data-celllook="0" style="width: 81.4668%;"><span data-contrast="auto">Safeharbour Support</span><span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td></tr><tr aria-rowindex="5"><td data-celllook="0" style="width: 18.5325%;">**<span data-contrast="auto">Approval date</span>**<span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td><td data-celllook="0" style="width: 22.3819%;"><span data-contrast="auto">01-JAN-2025</span><span data-ccp-props="{"134233117":false,"134233118":false,"201341983":0,"335551550":1,"335551620":1,"335559685":0,"335559737":0,"335559738":0,"335559739":0,"335559740":259}"> </span>

</td><td data-celllook="0" style="width: 29.5424%;">**<span data-contrast="auto">Review date</span>**<span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td><td data-celllook="0" style="width: 29.5424%;"><span data-contrast="auto">31-DEC-2027</span><span data-ccp-props="{"134233117":false,"134233118":false,"201341983":0,"335551550":1,"335551620":1,"335559685":0,"335559737":0,"335559738":0,"335559739":0,"335559740":259}"> </span>

</td></tr><tr aria-rowindex="6"><td data-celllook="0" style="width: 18.5325%;">**<span data-contrast="auto">Absract</span>**<span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td><td colspan="3" data-celllook="0" style="width: 81.4668%;">None

</td></tr><tr aria-rowindex="7"><td data-celllook="0" style="width: 18.5325%;">**<span data-contrast="auto">Scope</span>**<span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td><td colspan="3" data-celllook="0" style="width: 81.4668%;"><span data-contrast="auto">This document applies to all clients of Safeharbour Support Ltd</span>

</td></tr><tr aria-rowindex="8"><td data-celllook="0" style="width: 18.5325%;">**<span data-contrast="auto">Inputs</span>**<span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td><td colspan="3" data-celllook="0" style="width: 81.4668%;"><span data-contrast="auto">None</span><span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td></tr><tr aria-rowindex="9"><td data-celllook="0" style="width: 18.5325%;">**<span data-contrast="auto">Outputs</span>**<span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td><td colspan="3" data-celllook="0" style="width: 81.4668%;"><span data-contrast="auto">None</span>

</td></tr></tbody></table>

**<span data-contrast="auto">Change Control</span>**<span data-ccp-props="{"201341983":0,"335559739":160,"335559740":259}"> </span>

<table aria-rowcount="3" data-tablelook="1696" data-tablestyle="MsoTableGrid" id="bkmrk-date%C2%A0-author%C2%A0-versio" style="width: 98.5185%;"><tbody><tr aria-rowindex="1"><td data-celllook="0" style="width: 14.4291%;">**<span data-contrast="auto">Date</span>**<span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td><td data-celllook="0" style="width: 17.8168%;">**<span data-contrast="auto">Author</span>**<span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td><td data-celllook="0" style="width: 12.2079%;">**<span data-contrast="auto">Version</span>**<span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td><td data-celllook="0" style="width: 55.5459%;">**<span data-contrast="auto">Change</span>**<span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td></tr><tr aria-rowindex="2"><td data-celllook="0" style="width: 14.4291%;"><span data-contrast="auto">02-DEC-2024</span><span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td><td data-celllook="0" style="width: 17.8168%;"><span data-contrast="auto">Neil Tancock</span><span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td><td data-celllook="0" style="width: 12.2079%;"><span data-contrast="auto">0.0</span><span data-ccp-props="{"201341983":0,"335559740":259}"> </span>

</td><td data-celllook="0" style="width: 55.5459%;"><span data-contrast="auto">First version</span>

</td></tr><tr aria-rowindex="3"><td data-celllook="0" style="width: 14.4291%;"><span data-ccp-props="{"201341983":0,"335559740":259}">01-JAN-2025 </span>

</td><td data-celllook="0" style="width: 17.8168%;"><span data-ccp-props="{"201341983":0,"335559740":259}">Neil Tancock </span>

</td><td data-celllook="0" style="width: 12.2079%;"><span data-ccp-props="{"201341983":0,"335559740":259}">1.0 </span>

</td><td data-celllook="0" style="width: 55.5459%;"><span data-ccp-props="{"201341983":0,"335559685":0,"335559740":259}">Approved </span>

</td></tr></tbody></table>

<span data-ccp-props="{"201341983":0,"335559739":160,"335559740":259}">This is an uncontrolled copy when printed - please refer to the electronic version for the latest version</span>