Uploaded image for project: 'OpenICF'
  1. OpenICF
  2. OPENICF-1227

AD Powershell: Credentials are not used by the ADSISearch module

    XMLWordPrintable

Details

    Description

      The credentials are not used in the ADSISearch module.

       

      This should be added by the module to set them properly:

       

      if ($config.Credential) {                               
         # Use the credential pass from ADSearch 
         $credentials = $config.Credential                               
         $DomainDN = $searcher.Searchroot.path                               
         $Domain = New-Object -TypeName System.DirectoryServices.DirectoryEntry -ArgumentList      $DomainDN,$($credentials.UserName),$($credentials.GetNetworkCredential().password)                               
         $searcher.SearchRoot = $Domain                
      }
      
      

       

      Attachments

        Activity

          People

            gael Gael Allioux
            gael Gael Allioux
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: