Active Directory Query - Checking Profile

LyonJay
LyonJay used Ask the Experts™
on
Dear all,

We currently have two file servers and i need to quickly check in my Active Directory Users & Computers which users have there profile paths starting with \\tctfile does anyone know how i can create this script as i cannot find a option in the query editor for profile path?

Thanks,

Lyon
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2018
Distinguished Expert 2018
Commented:
In a command prompt, enter
dsquery user -limit 0 | dsget user -samid -profile | find /i "\\tctfile" >"tctfile-profiles.txt"

This will create the text file "tctfile-profiles.txt" with the user logon names and profile entries starting with the server name.
Krzysztof PytkoSenior Active Directory Engineer
Top Expert 2012
Commented:
Run this command on DC or workstation with Administrative Tools installed

dsquery user -name * -limit 0 | dsget user -fn -ln -samid -hmdir >c:\home_drives.txt

Import text file into excel and filter by HMDIR column

Regards,
Krzysztof
Krzysztof PytkoSenior Active Directory Engineer
Top Expert 2012

Commented:
or using oBdA's syntax

dsquery user -name * -limit 0 | dsget user -fn -ln -samid -hmdir | find /i "\\tctfile" >c:\home_drives.txt

@oBdA: sorry for using part of your syntax :)

Krzysztof
Should you be charging more for IT Services?

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Does anyone know a Powershell way of doing this?

Thanks,

Lyon
To do this using quest cmdlets the powershell would be

get-qaduser -homedirectory \\tctfile*

Author

Commented:
What about without Quest?

Thanks,

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial