Sorry, search feature is not supported in Internet Explorer 11

Enumerating user accounts

The following code sample enumerates user accounts located in a specific Organizational Unit.


# Connect to the Adaxes service
$admNS = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$admService = $admNS.GetServiceDirectly("localhost")

# Bind to the Organizational Unit
$containerDN = "CN=Users,DC=domain,DC=com"
$container = $admService.OpenObject("Adaxes://$containerDN", $NULL, $NULL, 0)

$container.Filter = @("user")

foreach ($user in $container)
    Write-Host $user.Get("cn")
Import-Module Adaxes

$containerDN = "CN=Users,DC=domain,DC=com"

$users = Get-AdmUser -Filter * -SearchBase $containerDN  `
    -SearchScope OneLevel -Server "" -AdaxesService localhost 

foreach ($user in $users)
    Write-Host $user.Name

See also