0 votes

We need to be able to put the name of the person requesting a account be disabled into the following custom command. We have in the past changed the description line to reflect the following: 'Disabled per {requestor} on current date and time by {Helpdesk username}. We tried using the variable %input% in the script below but it did not stop and allow input. Can you advise?

by (3.2k points)

1 Answer

0 votes
by (270k points)
selected by
Best answer

Hello,

In the template you are using for Description field value references (except for those containing initiator) are resolved from the Custom Command target object. To achieve what you need, Help Desk operators will need to enter the name of the requestor into one of DN syntax attributes of the target account (e.g. seeAlso) that is not in use and then execute the Custom Command.

The template for Description field in the Custom Command should be as follows: Disabled per %seeAlso% on %datetime% by %initiator%.

For information on how to add an attribute to Modify form, check the following help article: http://www.adaxes.com/help/?HowDoI.Conf ... iting.html.

0

Thank you, does does provide the desired result except it gives the Name and AD location. See below:

Disabled per CN=Cynthia Shortt,OU=PSC 2,OU=PSC,OU=ADMI,DC=admi,DC=com on 1/20/2017 12:46:31 PM by RHavener@admi.com

We would like just the person Common Name (CN) to be inputted or worse case the same as the initiator with the @admi.com at the end.

0

Hello,

This can be achieved using a PowerShell script. To do so:

  1. Launch Adaxes Administration Console.

  2. Navigate to the Custom Command and select it.

  3. Double-click Modify the user action.

  4. Select Run a program or PowerShell script.

  5. Enter a short description and paste the following script into the Script field:

     $descriptionTemplate = "Disabled per {0} on %datetime% by %initiator%" # TODO: modify me
     $requestorDNAttribute = "seeAlso" # TODO: modify me
    
     # Get requestor name
     try
     {
         $requestorDNs = $Context.TargetObject.GetEx($requestorDNAttribute)
         $requestor = $Context.BindToObjectByDN($requestorDNs[0])
         $requestorName = $requestor.Get("name")
     }
     catch
     {
         $requestorName = [System.String]::Empty
     }
    
     # Build description
     $description = [System.String]::Format($descriptionTemplate, $requestorName)
    
     # Update user description
     $Context.TargetObject.Put("description", $description)
     $Context.TargetObject.SetInfo()
    

    The {0} placeholder in the template will be replaced with the name of the user specified in the See Also field.

  6. Click OK and save the changes.

0

Works perfectly, as always thank you for the assistance.

Related questions

0 votes
1 answer

They can navigate to both the user or the group within the ADAXES web interface without issue. They can then either Add to Group or Add Member but the resulting ... something to the web interface which prevents changing the lookup domain. Any ideas? Thanks!

asked Apr 9, 2020 by VTPatsFan (610 points)
0 votes
1 answer

Hello, I am not getting email responses from support because of a technical problem. In the meantime, I figured for I would post here. I am using the new heldesk web ... how the helpdesk interface is configured and what the user's screen looks like: Thanks.

asked Jul 20, 2018 by Jasonmh (540 points)
0 votes
1 answer

Hi team, I need to update users extensionAttribute6 after adding or removing them from a specific group. This is my setup: Group is updated based on rule set within Adaxes ... would like to update users after they were added or removed from this group. Thanks!

asked Sep 25, 2023 by wintec01 (1.1k points)
0 votes
1 answer

I used the script below to try and accomplish this but I get an error. I did try to leave a comment but it would not let me. I tried running ... .adaxes.com/script-repository/add-users-located-in-particular-organizational-units-to-unmanaged-accounts-s178.htm

asked Nov 14, 2022 by raul.ramirez (210 points)
0 votes
1 answer

Are PowerShell commands supposed to show up in the programming interface after adding the module to the Adaxes server? I've installed modules and they don't show.

asked Aug 18, 2020 by ComputerHabit (790 points)
3,326 questions
3,026 answers
7,727 comments
544,681 users