I am looking for a way to create new user accounts.
I have got a scheduled report that runs in Sims.Net that extracts the users added to the roll list for that day and creates a .csv file. Now, I need to use this CSV file to create a new file with the right output to feed into a script I already have to create users. The script that creates the users is a vbscript.
I need to edit the name of the user to create the username, in the format of first name, first letter of the last name and a number (taken from their age on the system at registration time). An example: Joe Bloggs would be joeb6, but I think I can do this bit.
I also need to create the home dir for OS X, but this I think I can do as well
The issue is I'm not sure how to do this. Am I making this more difficult than it needs to be?
How do you guys do it?
Not that differently to you TBH. I use powershell with the 2008 R2 native ActiveDirectory module. Powershell really loves working with CSVs and makes this kind of thing relatively easy.. 20 lines max, or even one line if you've got a very widescreen and not much 'common' sense. PS is also good at string manipulation e.g. picking bits from a few columns to arrive at something like 'joeb6', or at least it seems that way if you've written any C# because the code is essentially identical.
Last edited by PiqueABoo; 6th February 2012 at 08:06 PM. Reason: ytpo
I was thinking more along the line of it being fully automated. I am downloading it now to have a look at it now..
I can usually read a script well enough to allow me to cobble something together but thats about it. As we get pupils coming in throughout the year and get no warning of their arrival, when it comes to ICT they have no user account. This is the reason I was going to automate the process. So the scheduled task runs to create the nightly CSV file of any pupils added on roll that day and then once this has been created, to then manipulate the file to create a csv file to run into the vbscript, all without manual intervention.
Is it possible to see your script PiqueABoo so as to give me an idea of what I would be looking to accomplish? Is your process completely automated too?
We use a batch file, created by exporting data from our Student Administration System.
Sorry I haven't replied only just seen the new posts.
I have now managed to tweak a script I had for creating users to check the csv file created from the SIMS Command line. Everything works as I had hoped it would except for one thing. When I manually run the script everything works fine. The users get pulled in from the csv file and the accounts get created in the AD. The user homes are also created and the OS X default template is copied in to the newly created home dir. Then the script uses the CACLS cmd to set the perms on the folders.
However, when the script is added to a scheduled task it doesn't manage to copy the folders over to the home dir and set the perms. The error is logged as a error 76 - Path not found.
Am I creating the scheduled task properly? Can you even schedule a VBS file to run?
sparkeh (8th January 2013)
Wait...i can schedule SIMS to the report for me?! How?! (I dont know the ins and outs of SIMS)
I use an automatic powershell script which runs every night that reads on-roll student data directly from sims, creates users accounts, home folders with permissions, mailboxes etc for new students and automatically archives the files and mail of old students and then deletes them. Its fully automated and can even handle and implement name changes because it stores admission numbers and upns in AD which it uses to compare users, no csv files or user interaction needed.
There are products available for sims which do something similar but they're not cheap and not as customisable as a powershell script so I wrote my own.
We also have powershell scripts for bulk import of users from csv etc in case its needed, its not hard at all to work with csvs in powershell as has been mentioned already.
The script is specific to our school, sims and AD configuration so I'd rather not make it public domain this time. Needless to say though, it really isn't hard and I can tell you where/how to get the data from sims using sql queries if you want.
There are currently 1 users browsing this thread. (0 members and 1 guests)