Results 1 to 4 of 4

Thread: Custom Tools AD Attribute Name

  1. #1

    Custom Tools AD Attribute Name

    I'm trying to use AD Attributes with a hyena custom tool to pass values to batch and powershell and noticed a couple problems. If you try and pass an AD Attribute Name from a selected user that doesn't exist Hyena crashes. I'm trying to pass %msRTCSIP-PrimaryUserAddress% (OCS/Lync/Skype4Business) %adminCount%, & %disinguishedName%. Not all users have an adminCount or msRTCSIP-PrimaryUserAddress attribute. The crash is one problem, the other is with the disinguishedName as it only passes CN. I think the "=" may be causing that problem.


    Tool cmd Examples
    C:\_HyenaCustomFiles\DoSomeThing.bat %E% %homeDirectory% %distinguishedName%
    powershell.exe -executionpolicy bypass -command C:\_HyenaCustomFiles\Lync\MigrateLegacyUser.ps1 -SAN %sAMAccountName%


    I was able to get around the the crash problem by just powershell directly to query the ad abject based on the sAMAccountName


    Any input is appreciated.
    Thanks

  2. #2
    I can't duplicate the crash, so let me know what version you are using. In my test, I used:

    test.bat %displayname% %distinguishedname%

    If the account didn't have a displayName, Hyena produced an error. We are trying to determine what to do going forward, as in most cases if the attribute isn't there, the command isn't going to work, but this depends on the syntax of what is being used I suppose.

    The %distinguishedname% is another issue. Hyena passes it, but something in Windows does not like the = sign. Its probably something in the batch language processor In my test.bat, I just had:

    echo %1
    echo %2
    pause

    When running, I just got CN for the DN.

    In fact, you can just run from the command prompt and type test.bat x CN=hello, and you can see the hello missing from the output.

    But if I changed my tool command to be:

    test.bat %displayname% "%distinguishedname%"

    Then, the DN was in quotes and everything worked. I could not figure out how to make the command interpretor just leave the quotes off.
    Kevin Stanush
    SystemTools Software Inc.

  3. #3
    I'm running Hyena 11.2.5 F on Server 2012 R2.
    Today I can't make Hyena Crash. But I get the dialog box "unable to retrieve 'admincount' attribute value for replacement." when the attribute doesn't exist for the object.
    Thanks for the quick response. I'm working around it, but I figured I'd mention it.
    Thanks Again.

  4. #4
    OK, let us know if you can duplicate this problem. We are trying to come up with ideas on how to handle attribute replacement (for multiple objects) when the attribute does not exist, but will probably popup an error asking if you want to be alerted any further for the current operation. What we tell customers now is if you just have one attribute to be replaced, and it needs to be there, sort on it first to filter out entries that don't have it set.
    Kevin Stanush
    SystemTools Software Inc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •