?
Solved

Searching for a space in AD fields

Posted on 2009-04-07
1
Medium Priority
?
262 Views
Last Modified: 2012-05-06
Due to a mistake made by one of our programmers we are in a situation where there are several users who have a space " " in some of their AD fields. Most notably their cell phone field. What the programmer did was inadvertently pass a space " " character rather than a null value. What I would like to do is find a way to clean this up.

I have tried doing a query in ADUC to find users where the mobile number starts with a space " " but it returns all users in AD.

Is there a way to search for a space " " character in a query.

0
Comment
Question by:Joseph Daly
[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
1 Comment
 
LVL 35

Accepted Solution

by:
Joseph Daly earned 0 total points
ID: 24088604
Ok so did a little digging on google and came up with a webpage that was able to help me. For those wh may need this solution in the future. The command I used was.

dsquery * -filter "(&((&objectCategory=user)(mobile=\20)))" | dsmod user -mobile ""

You have to escape the space character and then I guess 20 is the hex code for a space.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Always backup Domain, SYSVOL etc.using processes according to Microsoft Best Practices. This is meant as a disaster recovery process for small environments that did not implement backup processes and did not run a secondary domain controller that ne…
Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
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…
Suggested Courses

765 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