Solved

Script to check profile paths in AD

Posted on 2011-02-28
12
601 Views
Last Modified: 2012-05-11
Dear all,

We are currently moving all profiles from one server to another but i need to check which users in active directory still have there profile paths set to the old server.

Do anyone have a script that could show me a print out of who still have there profile path set to the old server?

Thanks,

Lyon
0
Comment
Question by:LyonJay
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3
12 Comments
 
LVL 39

Accepted Solution

by:
Krzysztof Pytko earned 250 total points
ID: 34995990
You can simply use Microsoft DS Tools. On a DC or workstation with Administrative Tools/RSAT installed type in command-line:

dsquery user -name * -limit 0 | dsget user -fn -ln -samid -hmdir | find /i "oldServerName"

Regards,
Krzysztof
0
 
LVL 74

Assisted Solution

by:Glen Knight
Glen Knight earned 250 total points
ID: 34995999
how about something like:

CSVDE -f C:\PROFILES.CSV -l "profilepath"

This will export the DN and the profile path to a CSV file.
0
 
LVL 3

Author Comment

by:LyonJay
ID: 34996024
Where would i run them querys from?

Thanks,

Lyon
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 74

Expert Comment

by:Glen Knight
ID: 34996027
both from a command prompt.
0
 
LVL 39

Expert Comment

by:Krzysztof Pytko
ID: 34996028
it's also good example :)

There is many ways for that :) PowerShell, CSVDE, LDIFDE, DS Tools, ADFind aso.
Usage depends on user preferences, I prefer using DS Tools :)

Krzysztof
0
 
LVL 3

Author Comment

by:LyonJay
ID: 34996041
Thanks guy!

Will have a go and get back to you!
0
 
LVL 3

Author Comment

by:LyonJay
ID: 34996058
demazter,

your query just errored out.

Thanks,

Lyon
0
 
LVL 74

Expert Comment

by:Glen Knight
ID: 34996063
possibly you don't have permissions to C:

take the c:\ off.

Try:

CSVDE -f PROFILES.CSV -l "profilepath"
0
 
LVL 74

Expert Comment

by:Glen Knight
ID: 34996066
the -l is a lowercase L not an i.
0
 
LVL 3

Author Comment

by:LyonJay
ID: 34996112
That didnt work.

Thanks,

Lyon
0
 
LVL 74

Expert Comment

by:Glen Knight
ID: 34996114
odd, what's the error you are getting?
0
 
LVL 39

Expert Comment

by:Krzysztof Pytko
ID: 34996125
and where you are typing this command? I would suggest doing that on a DC :)

Krzysztof
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question