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 news 3315E43-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?
| | | | | > | |
| | |