Solved

Searching for a space in AD fields

Posted on 2009-04-07
1
248 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
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

Join & Write a Comment

Suggested Solutions

Installing a printer using group policy preferences is not that hard let’s take a look at it. First lets open up your group policy console and edit the policy you want to add it to. I recommend creating a new policy for each printer makes it a l…
In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now