0 votes

We have a pretty cool PowerShell script written that imports users in AD from a CSV file, creates the user's home directory, creates a status of the import, archives the status as well as the CSV file used to import the user, and e-mails specified users when an import has been done. As it stands now, the script is being run with Windows Scheduled task once an hour on a virtual workstation. We want this task transferred over and managed from Adaxes.

The problem I'm having is that I can't just copy the script to the Scheduled Tasks in Adaxes and let it run every hour. When I check activity history after selecting run now, the task looks to never start. In creating the task, there's a few parts that I believe it's erring out at.

The first is Step 3: Choose the type of AD object on which the task will be performed. Not sure if there's a right one here, but it seems like none of the ones that I chose work.

The second is Step 5: Select the objects on which the task will be performed. I usually just select Finish and not select an object. Not sure if that's why it never starts (or finishes).

I've looked in the logging several hours after starting the task, but nothing shows up in the logs, so this one's a little tough for me to troubleshoot. I've spent nearly a day on this trying to get it working and nothing I do works. Any suggestions would more than welcome at this point.

by (130 points)

1 Answer

0 votes
by (216k points)

Hello,

A Scheduled Task in Adaxes runs on a certain Activity Scope. This means that the Task will be executed only for the objects of the type that you specify for the Task and only within the Scope that you define. Since at the last step of creating a Scheduled Task you select nothing, the Task just has an empty scope, that is, it has no objects to run on.

As for how to accomplish your task, take a look at the following tutorial. We think it has all you need: http://www.adaxes.com/tutorials_ActiveD ... romCSV.htm. Should you need further assistance, do not hesitate to ask.

Related questions

0 votes
1 answer

Hi, I am trying to find a way to have a visual overview of all enabled tasks and when they are running. Example of another app which support this: Is this maybe planned in future?

asked Oct 4, 2023 by wintec01 (940 points)
0 votes
1 answer

When I enable a scheduled task, instead of running at the scheduled time they all run imeadiately. This is not good behavior as changes are written in a way to reflect the ... is being enabled. I am hoping there is a powershell command to stop this behavoir.

asked Jul 10, 2023 by mightycabal (1.0k points)
0 votes
0 answers

I have created 2 different scheduled tasks. One with PowerShell and one that is a if in group set an attribute. Both of these scheduled tasks are just looping. The PowerShell ... ) and then recreated. I have added send an email and I get emails each loop.

asked Apr 24, 2023 by william.malone (60 points)
0 votes
1 answer

I realise that this has been asked a few times but I can't seem to get to resolution having read through previous advice. We have scheduled tasks set up to automatically ... /time region settings on all servers currently using Adaxes. They're all set to UK.

asked Apr 21, 2023 by Homelander90 (330 points)
0 votes
1 answer

I have a PowerShell Script (being run in a Custom Command) that creates a Scheduled Task that runs another Custom Command but I want the resulting Scheduled ... Exclude = $False $scopeItem.SetInfo() $task.ActivityScopeItems.Add($scopeItem) $task.SetInfo() }

asked Apr 1, 2021 by Staj (350 points)
3,293 questions
2,991 answers
7,664 comments
544,194 users