Kaseya Community

Full username from AD

  • Does anyone have a method to retreive the full name from the AD for usage in a batchfile?
    I'm trying to automate the deployment of mail templates through kaseya.

    Legacy Forum Name: Full username from AD,
    Legacy Posted By Username: itsimpel
  • itsimpel
    Does anyone have a method to retreive the full name from the AD for usage in a batchfile?
    I'm trying to automate the deployment of mail templates through kaseya.

    What do you mean by full name??
    maybe ldifde?
    -d RootDN The root of the LDAP search (Default to Naming Context)
    -r Filter LDAP search filter (Default to "(objectClass=*)")
    -p SearchScope Search Scope (Base/OneLevel/Subtree)
    -l list List of attributes (comma separated) to look for in an LDAP
    search.
    -o list List of attributes (comma separated) to omit from input
    -g Disable Paged Search
    -m Enable the SAM logic on export
    -n Do not export binary values

    Rudi

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: rudi
  • rudi
    What do you mean by full name??


    I mean the Exchange Display name.

    So I'm looking for a command to retrieve the Display name with the (%username%) currently logged on user...

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: itsimpel
  • itsimpel
    I mean the Exchange Display name.

    So I'm looking for a command to retrieve the Display name with the (%username%) currently logged on user...


    Set CNUsers = GetObject ("LDAP://CN=Users,DC=sunnydale,DC=muni")
    CNUsers.Filter = Array("user")
    For Each User in CNUsers
    HomeServer = User.msExchHomeServerName
    DisplayName = User.displayName
    WScript.Echo "HomeServer for " & DisplayName & " is " & HomeServer
    Next

    from http://www.msexchange.org/articles/Scripting-Exchange-VBScript-ADSI-Part1.html
    Great resource!

    Michael

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: RCS-Michael
  • Thanks...
    This is almost exactly what i'm looking for...

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: itsimpel