Jul 28

How To: List all users with a roaming profile

This How To will help you scan your entire domain and list all the users account with a roaming profile.


    How To:

  1. Run ActiveRoles Management Shell for Active Directory. You will need to be login or Run As with an account that have enough rights to read all users account in ADUC
  2. Run this PowerShell command:

Get-QADUser -sizelimit 0 | where {$_.profilepath -ne $NULL} | Select-object SamAccountName,profilepath | export-csv c:\UsersProfiles.csv

The command might take a long time to run depending on the size of your active directory database. Once the command is completed you will find a file call UserProfiles.csv at the root of your C drive. This file will have 2 columns: samAccountName and ProfilePath.


Get-QADUser -sizelimit 0

Get-QADUser is a CMDLET’s only available in Quest Software PowerShell CMDLET’s. Use this CMDLET’s to get information on AD user accounts.
-sizelimit 0 will return all the accounts with a roaming profile. Change the value to limit the number of account reported. (ie: -sizelimit 1000)

where {$_.profilepath -ne $NULL}

Will only select the user account that have a roaming profile (the profilepath value of the user account is not NULL)

Select-object SamAccountName,profilepath

Will only select the samAccountName and the profilepath from all the attributes that the command returns.

export-csv c:\UsersProfiles.csv

Will export the result to a CSV file

Please feel free to use the comments section for any questions or if you find any bug in this post.


  1. Shan

    Hey Daniel,

    This one doesn’t need the Quest Powershell:

    PS C:\> GET-ADUser -Filter * -properties ProfilePath |where {$_.ProfilePath -ne $NULL} |FT Name, ProfilePath | Out-File c:\Temp\test.txt

    Greetings from Swiss

  2. Dan Fortier

    Hey Shan,

    You are right but you would need Active Directory 2008 R2 in order to use the Get-ADUser commandlet. For AD 2003 or 2008 not R2 you would need to use Quest.

    Thanks for your comment.


  3. Tom

    Thanks Dan.

    Which commandlet will report the size of each profiles from the domain?


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>