Forum Search:
Forum.Brain-Cluster.com: Brain Cluster Technical Forum
Ultimate forum for Technical Discussions

Home » Microsoft » Windows Server » Active Directory » remove space in upn or samaccountname
remove space in upn or samaccountname [message #347343] Fri, 18 December 2009 01:57 Go to next message
Evren Sevilmis  is currently offline Evren Sevilmis  Turkey
Messages: 12
Registered: July 2009
Junior Member
Hi,

How can i find user who have space character in upn or samaccount name?
Re: remove space in upn or samaccountname [message #347436 is a reply to message #347343] Fri, 18 December 2009 06:24 Go to previous messageGo to next message
pbbergs  is currently offline pbbergs  United States
Messages: 1024
Registered: July 2009
Senior Member
You could try using Powershell with the Quest cmdlets (http://powergui.org).

Quest
http://www.quest.com/powershell/

Just get all samaccount names and use the contains method
http://www.computerperformance.co.uk/powershell/powershell_c onditional_operators.htm

Microsoft Script Repository
http://gallery.technet.microsoft.com/ScriptCenter/en-us/6445 7a5a-677a-492d-ad6c-957b0997d1ba

--
Paul Bergson
MVP - Directory Services
MCTS, MCT, MCSE, MCSA, Security+, BS CSci
2008, 2003, 2000 (Early Achiever), NT4
Microsoft's Thrive IT Pro of the Month - June 2009

http://www.pbbergs.com

Please no e-mails, any questions should be posted in the NewsGroup This
posting is provided "AS IS" with no warranties, and confers no rights.

"Evren Sevilmis" <seth@gonca.net> wrote in message
news:45e86f3c355bf8cc4de7fb80f851@msnews.microsoft.com...
>
> Hi,
> How can i find user who have space character in upn or samaccount name?
>
>
Re: remove space in upn or samaccountname [message #347441 is a reply to message #347436] Fri, 18 December 2009 06:37 Go to previous messageGo to next message
Evren Sevilmis  is currently offline Evren Sevilmis  Turkey
Messages: 12
Registered: July 2009
Junior Member
What an answer..

If i had asked "how can i make an hamburger" i think you'd say "go to mc
donalds"


Hello Paul Bergson [MVP-DS],

> You could try using Powershell with the Quest cmdlets
> (http://powergui.org).
>
> Quest
> http://www.quest.com/powershell/
> Just get all samaccount names and use the contains method
> http://www.computerperformance.co.uk/powershell/powershell_c onditional
> _operators.htm
>
> Microsoft Script Repository
> http://gallery.technet.microsoft.com/ScriptCenter/en-us/6445 7a5a-677a-
> 492d-ad6c-957b0997d1ba
> http://www.pbbergs.com
>
> Please no e-mails, any questions should be posted in the NewsGroup
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> "Evren Sevilmis" <seth@gonca.net> wrote in message
> news:45e86f3c355bf8cc4de7fb80f851@msnews.microsoft.com...
>
>> Hi,
>> How can i find user who have space character in upn or samaccount
>> name?
Re: remove space in upn or samaccountname [message #347459 is a reply to message #347343] Fri, 18 December 2009 07:17 Go to previous messageGo to next message
rlmueller-nospam  is currently offline rlmueller-nospam  United States
Messages: 292
Registered: July 2009
Senior Member
"Evren Sevilmis" <seth@gonca.net> wrote in message
news:45e86f3c355bf8cc4de7fb80f851@msnews.microsoft.com...
>
> Hi,
> How can i find user who have space character in upn or samaccount name?
>

The filter for objects with a space in sAMAccountName would be:

(sAMAccountName=* *)

and for userPrincipalName would be:

(userPrincipalName=* *)

You could use this with Joe Richards' adfind utility. Or, I have an example
VBScript program that prompts for the base of the query, the LDAP syntax
filter, and a comma delimited list of attribute values to retrieve linked
here:

http://www.rlmueller.net/GenericADO.htm

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
Re: remove space in upn or samaccountname [message #347478 is a reply to message #347441] Fri, 18 December 2009 07:33 Go to previous messageGo to next message
pbbergs  is currently offline pbbergs  United States
Messages: 1024
Registered: July 2009
Senior Member
I'm not going to write the script for you all the links give you complete
details on what you need. Not sure why you took offense to it.

--
Paul Bergson
MVP - Directory Services
MCTS, MCT, MCSE, MCSA, Security+, BS CSci
2008, 2003, 2000 (Early Achiever), NT4
Microsoft's Thrive IT Pro of the Month - June 2009

http://www.pbbergs.com

Please no e-mails, any questions should be posted in the NewsGroup This
posting is provided "AS IS" with no warranties, and confers no rights.

"Evren Sevilmis" <seth@gonca.net> wrote in message
news:45e86f3c3565c8cc4e0f35c4750e@msnews.microsoft.com...
> What an answer..
>
> If i had asked "how can i make an hamburger" i think you'd say "go to mc
> donalds"
>
>
> Hello Paul Bergson [MVP-DS],
>
>> You could try using Powershell with the Quest cmdlets
>> (http://powergui.org).
>>
>> Quest
>> http://www.quest.com/powershell/
>> Just get all samaccount names and use the contains method
>> http://www.computerperformance.co.uk/powershell/powershell_c onditional
>> _operators.htm
>>
>> Microsoft Script Repository
>> http://gallery.technet.microsoft.com/ScriptCenter/en-us/6445 7a5a-677a-
>> 492d-ad6c-957b0997d1ba
>> http://www.pbbergs.com
>>
>> Please no e-mails, any questions should be posted in the NewsGroup
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Evren Sevilmis" <seth@gonca.net> wrote in message
>> news:45e86f3c355bf8cc4de7fb80f851@msnews.microsoft.com...
>>
>>> Hi,
>>> How can i find user who have space character in upn or samaccount
>>> name?
>
>
Re: remove space in upn or samaccountname [message #348286 is a reply to message #347459] Sat, 19 December 2009 09:11 Go to previous messageGo to next message
Evren Sevilmis  is currently offline Evren Sevilmis  Turkey
Messages: 12
Registered: July 2009
Junior Member
This is an answer. Thank you Richard.






Hello Richard Mueller [MVP],

> "Evren Sevilmis" <seth@gonca.net> wrote in message
> news:45e86f3c355bf8cc4de7fb80f851@msnews.microsoft.com...
>
>> Hi,
>> How can i find user who have space character in upn or samaccount
>> name?
> The filter for objects with a space in sAMAccountName would be:
>
> (sAMAccountName=* *)
>
> and for userPrincipalName would be:
>
> (userPrincipalName=* *)
>
> You could use this with Joe Richards' adfind utility. Or, I have an
> example VBScript program that prompts for the base of the query, the
> LDAP syntax filter, and a comma delimited list of attribute values to
> retrieve linked here:
>
> http://www.rlmueller.net/GenericADO.htm
>
Re: remove space in upn or samaccountname [message #348645 is a reply to message #348286] Sat, 19 December 2009 20:39 Go to previous messageGo to next message
Cary Shultz  is currently offline Cary Shultz  United States
Messages: 127
Registered: August 2009
Senior Member
All of the links that Paul gave you provide you with the path to determining
the answer for yourself. When I was an MVP for AD, I almost always
hesitated in giving the answer as the path to that answer is often a
wonderful journey. Now, do not misunderstand....no criticism here coming
from me. It is just that Paul provided you with the means to determine the
answer on your own. Which - in my opinion - is the whole point of the news
groups. You know the saying.....give a man a fish, feed him for a
day...teach him how to fish and feed him for life!

Anyway, if you go to Richard's web site (http://www.rlmueller.net) you will
find a ton of awesomely outstanding scripts and some pretty nifty
instruction. Paul has a pretty nifty web site (tools) as well.

Anyway, I understand that we can not 'see' your intent in black and white.
If this were a face-to-face discussion sometimes a little wink or a smile or
some other bodily gesture changes the words. In black and white all of that
is simply not possible. Everyone in here is here on his or her own time.
MVPs do a *LOT* of stuff.....

Thanks,

Cary


"Evren Sevilmis" <seth@gonca.net> wrote in message
news:45e86f3c358ea8cc4eedc8f812f3@msnews.microsoft.com...
> This is an answer. Thank you Richard.
>
>
>
>
>
>
> Hello Richard Mueller [MVP],
>
>> "Evren Sevilmis" <seth@gonca.net> wrote in message
>> news:45e86f3c355bf8cc4de7fb80f851@msnews.microsoft.com...
>>
>>> Hi,
>>> How can i find user who have space character in upn or samaccount
>>> name?
>> The filter for objects with a space in sAMAccountName would be:
>>
>> (sAMAccountName=* *)
>>
>> and for userPrincipalName would be:
>>
>> (userPrincipalName=* *)
>>
>> You could use this with Joe Richards' adfind utility. Or, I have an
>> example VBScript program that prompts for the base of the query, the
>> LDAP syntax filter, and a comma delimited list of attribute values to
>> retrieve linked here:
>>
>> http://www.rlmueller.net/GenericADO.htm
>>
>
>
Re: remove space in upn or samaccountname [message #348724 is a reply to message #348645] Sun, 20 December 2009 02:32 Go to previous messageGo to next message
Evren Sevilmis  is currently offline Evren Sevilmis  Turkey
Messages: 12
Registered: July 2009
Junior Member
I agree almost everything you said but if someone asks you "Where is the
postoffice" you shouldn't say "Look a the city guide". You say "i don't know"
or you say "turn right, go 100 meters straight etc."

I didn't resquest anyone to write me a script. his is a simple question and
he answer is quite simple as Richard answered.





Hello Cary,

> All of the links that Paul gave you provide you with the path to
> determining the answer for yourself. When I was an MVP for AD, I
> almost always hesitated in giving the answer as the path to that
> answer is often a wonderful journey. Now, do not misunderstand....no
> criticism here coming from me. It is just that Paul provided you with
> the means to determine the answer on your own. Which - in my opinion
> - is the whole point of the news groups. You know the saying.....give
> a man a fish, feed him for a day...teach him how to fish and feed him
> for life!
>
> Anyway, if you go to Richard's web site (http://www.rlmueller.net) you
> will find a ton of awesomely outstanding scripts and some pretty nifty
> instruction. Paul has a pretty nifty web site (tools) as well.
>
> Anyway, I understand that we can not 'see' your intent in black and
> white. If this were a face-to-face discussion sometimes a little wink
> or a smile or some other bodily gesture changes the words. In black
> and white all of that is simply not possible. Everyone in here is
> here on his or her own time. MVPs do a *LOT* of stuff.....
>
> Thanks,
>
> Cary
>
> "Evren Sevilmis" <seth@gonca.net> wrote in message
> news:45e86f3c358ea8cc4eedc8f812f3@msnews.microsoft.com...
>
>> This is an answer. Thank you Richard.
>>
>> Hello Richard Mueller [MVP],
>>
>>> "Evren Sevilmis" <seth@gonca.net> wrote in message
>>> news:45e86f3c355bf8cc4de7fb80f851@msnews.microsoft.com...
>>>
>>>> Hi,
>>>> How can i find user who have space character in upn or samaccount
>>>> name?
>>> The filter for objects with a space in sAMAccountName would be:
>>>
>>> (sAMAccountName=* *)
>>>
>>> and for userPrincipalName would be:
>>>
>>> (userPrincipalName=* *)
>>>
>>> You could use this with Joe Richards' adfind utility. Or, I have an
>>> example VBScript program that prompts for the base of the query, the
>>> LDAP syntax filter, and a comma delimited list of attribute values
>>> to retrieve linked here:
>>>
>>> http://www.rlmueller.net/GenericADO.htm
>>>
Re: remove space in upn or samaccountname [message #348811 is a reply to message #348724] Sun, 20 December 2009 07:29 Go to previous message
Cary Shultz  is currently offline Cary Shultz  United States
Messages: 127
Registered: August 2009
Senior Member
Good morning, Evren!

Hey, on a totally different topic...from what country are you? Your last
name has me stumped. I lived in Germany for three+ years after graduating
from University here in the US and a big hobby of mine is languages (spoken,
not code!).

Anyway, back to the topic....

Okay, good point. But, I do not think that Paul's reply was "look at a city
map"....but maybe we are going to agree to disagree on this point.

I kinda know Paul and I can assure you that his reply was not "look at a
city map". Anyway, the main thing is that you did get help in this
newsgroup. I can assure you from years of participation (been a bit on the
light side the last three or four years) that there are some really really
really smart people who participate in this newsgroup. I really believe
that this specific newsgroup is one of the best out there.

Glad that you did get an answer and hope that you continue to participate.
I started in this news group and learned a whole lot!

Cary

"Evren Sevilmis" <seth@gonca.net> wrote in message
news:45e86f3c35aa28cc4f7f418f86df@msnews.microsoft.com...
>I agree almost everything you said but if someone asks you "Where is the
>postoffice" you shouldn't say "Look a the city guide". You say "i don't
>know" or you say "turn right, go 100 meters straight etc."
>
> I didn't resquest anyone to write me a script. his is a simple question
> and he answer is quite simple as Richard answered.
>
>
>
>
>
> Hello Cary,
>
>> All of the links that Paul gave you provide you with the path to
>> determining the answer for yourself. When I was an MVP for AD, I
>> almost always hesitated in giving the answer as the path to that
>> answer is often a wonderful journey. Now, do not misunderstand....no
>> criticism here coming from me. It is just that Paul provided you with
>> the means to determine the answer on your own. Which - in my opinion
>> - is the whole point of the news groups. You know the saying.....give
>> a man a fish, feed him for a day...teach him how to fish and feed him
>> for life!
>>
>> Anyway, if you go to Richard's web site (http://www.rlmueller.net) you
>> will find a ton of awesomely outstanding scripts and some pretty nifty
>> instruction. Paul has a pretty nifty web site (tools) as well.
>>
>> Anyway, I understand that we can not 'see' your intent in black and
>> white. If this were a face-to-face discussion sometimes a little wink
>> or a smile or some other bodily gesture changes the words. In black
>> and white all of that is simply not possible. Everyone in here is
>> here on his or her own time. MVPs do a *LOT* of stuff.....
>>
>> Thanks,
>>
>> Cary
>>
>> "Evren Sevilmis" <seth@gonca.net> wrote in message
>> news:45e86f3c358ea8cc4eedc8f812f3@msnews.microsoft.com...
>>
>>> This is an answer. Thank you Richard.
>>>
>>> Hello Richard Mueller [MVP],
>>>
>>>> "Evren Sevilmis" <seth@gonca.net> wrote in message
>>>> news:45e86f3c355bf8cc4de7fb80f851@msnews.microsoft.com...
>>>>
>>>>> Hi,
>>>>> How can i find user who have space character in upn or samaccount
>>>>> name?
>>>> The filter for objects with a space in sAMAccountName would be:
>>>>
>>>> (sAMAccountName=* *)
>>>>
>>>> and for userPrincipalName would be:
>>>>
>>>> (userPrincipalName=* *)
>>>>
>>>> You could use this with Joe Richards' adfind utility. Or, I have an
>>>> example VBScript program that prompts for the base of the query, the
>>>> LDAP syntax filter, and a comma delimited list of attribute values
>>>> to retrieve linked here:
>>>>
>>>> http://www.rlmueller.net/GenericADO.htm
>>>>
>
>
Previous Topic:Windows 7 Testing
Next Topic:IIS windows prompt issue
Goto Forum:
  


Current Time: Tue Jan 23 16:31:51 MST 2018

Total time taken to generate the page: 0.08090 seconds
.:: Contact :: Home ::Sitemap::.

Powered by: FUDforum 3.0.0RC2.
Copyright ©2001-2009 FUDforum Bulletin Board Software