0 votes

We have a workflow where when an employee is deprovisioned we manually add a manager to access of the network drive of the employee. We would like to add this to the process and allow 14 days access and then move the drive to a "holding" folder for 365 days then delete it. We did see a few options in the custom command builder but unsure of the actual settings needed.

by (3.2k points)

1 Answer

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

Hello,

The solution will include a Custom Command and a Scheduled Task. The command will execute the following script from our repository: http://www.adaxes.com/script-repository ... er-s15.htm and set a date property to the current date/time. We recommend using one of Adaxes custom date attributes (e.g. CustomAttributeDate1). The property will be used to detect when the home directory must be moved and deleted. The Scheduled Task will move and delete the home directory depending on the date property (i.e. CustomAttributeDate1).

i. Creating the Custom Command

  1. Launch Adaxes Administration Console.
  2. Right-click your Adaxes service node, navigate to New and click Custom Command.
  3. On step 2 of the Create Custom Command wizard select User Object type.
  4. Click Add Action and select Run a program or PowerShell script.
  5. Enter a short description and paste the script into the Script field.
  6. Click OK.
  7. Right-click the action you have created and click Add New Action.
  8. Select Update the User and click Add.
  9. Select CustomAttributeDate1 in the Property to modify drop-down list.
  10. Select Update value and click Edit.
  11. Click OK three times.
  12. Click Next and finish creating the Custom Command. You should have something like the following:

ii. Creating the Scheduled Task.

  1. Launch Adaxes Administration Console.
  2. Right-click your Adaxes service node, navigate to New and click Scheduled Task.
  3. On step 3 of the Create Scheduled Task wizard select User Object type.
  4. Click Add Action and select Move the home directory.
  5. Specify Action Parameters and click OK.
  6. Right-click the action you have created and click Add Condition.
  7. Select If <property><relation><value>.
  8. Select If CustomAttributeDate1 less or equal and click Edit.
  9. Select minus 13 days and click OK twice.
  10. Right-click the action you have created again and click Add New Action.
  11. Select Update the User and click Add.
  12. Select CustomAttributeDate1 in the Property to modify drop-down list.
  13. Select Update value and click Edit.
  14. Click OK three times.
  15. Right-click the action and click Add Condition again.
  16. Select If <property><relation><value>.
  17. Select If Home Directory does not contain and specify the first part of the location of the “holding” folder.
  18. Click OK.
  19. Click Add action to a new set.
  20. Select Delete the home directory and click OK.
  21. Double-click Always.
  22. Select If <property><relation><value>.
  23. Select If CustomAttributeDate1 less or equal and click Edit.
  24. Select minus 1 year and click OK twice.
  25. Right-click the action in the new set and click Add New Action.
  26. Select Update the User and click Add.
  27. Select CustomAttributeDate1 in the Property to modify drop-down list.
  28. Select Remove property and click OK twice.
  29. Click Next and finish creating the Scheduled Task. You should have something like the following:

Related questions

0 votes
1 answer

Hi, in our Create User action we have setup a custom binary attribute to upload the staff picture. Is there a way to save the uploaded image to a network share and rename ... out how to save the uploaded image to the share with proper file name. Thank you.

asked Apr 29, 2021 by TJ_Umredkar (140 points)
0 votes
1 answer

The use case we are looking for is providing a list of titles for users to choose from when initiating a re-hire. We already have a title property pattern established and would ... that we can manage the list in one place. Let me know and as always, thanks.

asked 3 days ago by msheppard (470 points)
0 votes
1 answer

We've the following script we want to use in Adaxes to create as part of user creation, to ask if the user will need a AWS workspace, then asks employeetype for different ... "Error") exit(-1) } else { $Context.LogMessage("Created workspace", "Information") }

asked May 3 by Plusa (20 points)
0 votes
1 answer

Hi team, I have a follow up to this question https://www.adaxes.com/questions/14234/business-after-adding-members-powershell-script-executed Let me explain my setup A rule- ... area% failed due to the following exception: $($_.Exception.Message)", "Error") }

asked Feb 13 by wintec01 (1.5k points)
0 votes
1 answer

Hi, When we add custom command action in UI, when a user selects 1 or more users for that custom commands, is there a way to integrate those selected users as input value into that custom command script and take action on those users.

asked Feb 5 by Renugopal (120 points)
3,552 questions
3,242 answers
8,243 comments
547,828 users