Microsoft Windows

Powershell to get list of AD Users and their ProfilePath and HomeDirectory

To ensure consistency it is often desirable to run a script periodically to confirm all users are setup as expected. The following powershell script can help with obtaining ProfilePath, HomeDirectory and HomeDrive.

In an elevated (run as Administrator) powershell window run the following:
Get-ADUser -Filter 'enabled -eq $true' -Properties ProfilePath, HomeDirectory, HomeDrive | Select Name, SamAccountName, ProfilePath, HomeDirectory, HomeDrive

To export the list into a more convenient format such as CSV simply run the following:
Get-ADUser -Filter 'enabled -eq $true' -Properties ProfilePath, HomeDirectory, HomeDrive | Select Name, SamAccountName, ProfilePath, HomeDirectory, HomeDrive | Export-Csv -path "c:\temp\userlist.csv"

The above can be tweaked to get more properties as needed.

← Enable or disable mailbox audit logging for a mailbox
Windows Time Sync →

Related articles

Microsoft Windows

Windows Time Sync

w32tm /config /manualpeerlist:"1.us.pool.ntp.org" /syncfromflags:manual /reliable:YES /update w32tm /config…

Read article
Need Hands-On Help

Talk to an engineer about your environment

Our team runs this kind of infrastructure every day — not just writes about it.