Skip to content

Auth

OAuth

LDAP

$path = "LDAP://ldapserver:389/OU=marketing,OU=employee,DC=example,DC=co,DC=jp"
$auth = [System.DirectoryServices.AuthenticationTypes]::FastBind
$user = "CN=88888888,OU=marketing,OU=employee,DC=example,DC=co,DC=jp"
$pass = "P@ssw0rd"
$entry = New-Object System.DirectoryServices.DirectoryEntry($path, $user, $pass, $auth)
$query = New-Object System.DirectoryServices.DirectorySearcher($entry,"(objectclass=*)")
$entries = $query.FindAll()
$entries | %{$_.Properties}