View Single Post
Old 04-11-2008   #8 (permalink)
Brandon Shell [MVP]
Guest


 

Re: Active directory search

I agree, if you use the get-qaduser it is more direct approach.

There was nothing wrong with using Get-QADUser, I think Karl was just trying
to narrow the scope of potential performance issues that you were
experiencing (I already address that in that post.)

Keep using Quest CMDLets. They are free, simple, and powerful.

"Swamy Channaveera" <SwamyChannaveera@xxxxxx> wrote in
message news:CB89FAF5-71EA-48ED-AE18-57065CC73C88@xxxxxx
Quote:

> It seems using quest's get-qaduser is a best bet, the following scripts
> getting more complex as i'm not a scripting guy, i'm a support person on
> Exchange and AD. Hope fully MS would simplify the scripts in PS for
> support
> guys.
>
> "Brandon Shell [MVP]" wrote:
>
Quote:

>> not in v1 without modifying the type extensions.
>>
>> This will do what your wanting
>>
>> function Get-MyADUser($user="*"){
>> $filter = "(&(objectcategory=user)(sAMAccountName=$user)"
>> $ds = new-object
>> system.directoryservices.directorysearcher([adsi]"",$filter)
>> $ds.pagesize = 1000
>> $ds.findall() | %{$_.GetDirectoryEntry()}
>> }
>>
>> "Swamy Channaveera" <SwamyChannaveera@xxxxxx> wrote in
>> message news3315E43-B209-4895-9422-E4381049492D@xxxxxx
Quote:

>> > Hi,
>> >
>> > without specifying the complete DN of an object and using
>> > [ADSI]"LDAP:// "
>> > provider can i serach an object? assuming my AD has many OU and users
>> > are
>> > spread across many OU?
>>
My System SpecsSystem Spec
 
Page generated in 0.26325 seconds with 9 queries