Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

DSQUERY | DSGET filtered for null field result

Posted on 2006-06-03
4
Medium Priority
?
4,533 Views
Last Modified: 2012-08-14
I have been using the DS tools for about 6 months and have finally run into a simple problem, upon which I am sure someone can shed light...

I use the following command to show users and their profile paths by Distinguished Name.

dsquery user -name * | dsget user -profile -dn

NOW, I need to filter this output to show only those folks with no entries in their profile path.

This would be the quickest way to output those users for whom we have not migrated from NDS 6.0 profiles to AD profiles. I need to do a quick check to see if we have accounted for everyone using this method.

Any ideas how to filter for <NULL> using DS tools? This is the crux of this question. If there is no way, I will write a WSH script and be done with it.
0
Comment
Question by:John Darby
  • 2
4 Comments
 
LVL 15

Expert Comment

by:Darwinian999
ID: 16826894
I don't think that you can, but you can pipe the output to a CSV file, open it in excel and sort the output based on the profile column. That'll group the users that don't have a profile path.
0
 
LVL 4

Accepted Solution

by:
Imran Hashim earned 1500 total points
ID: 16827226
You should use a Saved Query for this. Create a new query, name it something, Press Define Query button, Select Custom Search from Find drop down box, Click on advanced button and paste the following:

(objectCategory=person)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2)(!ProfilePath=*)

This query will find all users that are not disabled and do not have anything in profile path.

Hope this works for you.
0
 
LVL 4

Expert Comment

by:Imran Hashim
ID: 16827426
I forgot to mention that the saved query is created in Active Directory Users and Computers. (Just in case someone does not know where to do this :))
0
 
LVL 1

Author Comment

by:John Darby
ID: 16828004
Thanks Darwinian.

Thanks Imran, I awarded you points since you offered an alternative. I am in the process of writing a VBS script which I will use AT scheduler to run every 24 hours. This output will be automatically emailed to NDS -> AD Migration Coordinator.

Thanks again,
John
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…

577 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