Question
Connexion Base ADLDS
- MARTINEZ
- Auteur du sujet
- Hors Ligne
- Nouveau membre
-
Réduire
Plus d'informations
- Messages : 16
- Remerciements reçus 0
il y a 14 ans 4 mois #10919
par MARTINEZ
Connexion Base ADLDS a été créé par MARTINEZ
Bonjour,
Je n'arrive pas à récupere les information contenu dans une base adlds
En faisant ce type de chose sur une base AD cela fonctionne, mais dés que je passe sur une base ADLDS cela ne fonctionne plus.
J'utilise le code suivant:
C:\Users\Administrator\Documents\Powershell\presque.ps1:8 char:35
+ $objResult = $objRecherche.FindAll <<<< ()
+ CategoryInfo : NotSpecified: ( : ) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
$objDomaine = [adsi]\"LDAP://Server: Port/DC=XXX,DC=YYY,DC=ZZZ\",\"CompteConnexion\",\"MDP\"
$objRecherche = new-object system.DirectoryServices.DirectorySearcher($objDomaine)
$objRecherche =[System.DirectoryServices.AuthenticationTypes]::FastBind$objRecherche.Filter=\"(&(objectCategory=user)(objectClass=user))\"
$objResult = $objRecherche.FindAll()
$objResult | ForEach-Object {
if($_.Properties.memberof -contains 'CN=AAA,OU=BBB,DC=XXX,DC=YYY,DC=ZZZ') {
#Action a effectuer
}
}
Le message suivant arrive:
Exception calling \"FindAll\" with \"0\" argument(s): \"The specified directory service attribute or value does not exist.
\"
PropetiesToLoad contient le mot de passe utilisé est-ce normal?
CacheResults : True
ClientTimeout : -00:00:01
PropertyNamesOnly : False
Filter : (&(objectCategory=user)(objectClass=user))
PageSize : 0
PropertiesToLoad : {MDP}
ReferralChasing : External
SearchScope : Subtree
ServerPageTimeLimit : -00:00:01
ServerTimeLimit : -00:00:01
SizeLimit : 0
SearchRoot : System.DirectoryServices.DirectoryEntry
Sort : System.DirectoryServices.SortOption
Asynchronous : False
Tombstone : False
AttributeScopeQuery :
DerefAlias : Never
SecurityMasks : None
ExtendedDN : None
DirectorySynchronization :
VirtualListView :
Site :
Container :
Je n'arrive pas à récupere les information contenu dans une base adlds
En faisant ce type de chose sur une base AD cela fonctionne, mais dés que je passe sur une base ADLDS cela ne fonctionne plus.
J'utilise le code suivant:
C:\Users\Administrator\Documents\Powershell\presque.ps1:8 char:35
+ $objResult = $objRecherche.FindAll <<<< ()
+ CategoryInfo : NotSpecified: ( : ) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
$objDomaine = [adsi]\"LDAP://Server: Port/DC=XXX,DC=YYY,DC=ZZZ\",\"CompteConnexion\",\"MDP\"
$objRecherche = new-object system.DirectoryServices.DirectorySearcher($objDomaine)
$objRecherche =[System.DirectoryServices.AuthenticationTypes]::FastBind$objRecherche.Filter=\"(&(objectCategory=user)(objectClass=user))\"
$objResult = $objRecherche.FindAll()
$objResult | ForEach-Object {
if($_.Properties.memberof -contains 'CN=AAA,OU=BBB,DC=XXX,DC=YYY,DC=ZZZ') {
#Action a effectuer
}
}
Le message suivant arrive:
Exception calling \"FindAll\" with \"0\" argument(s): \"The specified directory service attribute or value does not exist.
\"
PropetiesToLoad contient le mot de passe utilisé est-ce normal?
CacheResults : True
ClientTimeout : -00:00:01
PropertyNamesOnly : False
Filter : (&(objectCategory=user)(objectClass=user))
PageSize : 0
PropertiesToLoad : {MDP}
ReferralChasing : External
SearchScope : Subtree
ServerPageTimeLimit : -00:00:01
ServerTimeLimit : -00:00:01
SizeLimit : 0
SearchRoot : System.DirectoryServices.DirectoryEntry
Sort : System.DirectoryServices.SortOption
Asynchronous : False
Tombstone : False
AttributeScopeQuery :
DerefAlias : Never
SecurityMasks : None
ExtendedDN : None
DirectorySynchronization :
VirtualListView :
Site :
Container :
Connexion ou Créer un compte pour participer à la conversation.
- xyz
- Hors Ligne
- Modérateur
-
Réduire
Plus d'informations
- Messages : 6311
- Remerciements reçus 69
il y a 14 ans 4 mois #10925
par xyz
Tutoriels PowerShell
Réponse de xyz sur le sujet Re:Connexion Base ADLDS
Salut,
tu auras fait tous les forums
Au cas où, si tu n'obtiens pas de réponse, il te restera celui-ci aux US
tu auras fait tous les forums
Au cas où, si tu n'obtiens pas de réponse, il te restera celui-ci aux US
Tutoriels PowerShell
Connexion ou Créer un compte pour participer à la conversation.
Temps de génération de la page : 0.033 secondes
- Vous êtes ici :
-
Accueil
-
forum
-
PowerShell
-
Entraide pour les débutants
- Connexion Base ADLDS