|
Account server script examples
|
|
| · | 2000 server script
|
| · | NT4 server script
|
| · | Get PGP encrypted e-mail attachment*
|
| · | If there are more than one attachment on the e-mail server they are processed in chronological order*
|
| · | Decrypt attachment*
|
| · | Replace slash character ("/") with underscore ("_") in data column 8 (slashes are not allowed in group names)
|
| · | Depending on data in attachment either
|
| · | create account
|
| · | [W2k script only] create OU if needed (OU structure: domain \ unit (school) \ class)
|
| · | create account
|
| · | [W2k script only] set AD properties
|
| · | create group if needed
|
| · | set group membership
|
| · | create home directory (Home directory structure: users \ birth year \ student)
|
| · | set home directory permissions
|
| · | create hidden share
|
| · | print password sheet
|
| · | disable / enable account
|
| · | delete account (The script does not actually delete the account, instead it sets expiration date to January 01, 2000 -> no longer possible to log on, administrator then deletes accounts manually = safety measure! For Windows 2000 it is possible to make things really easy - for an example of how to display a list of accounts for which expiration date has been set to 2000-01-01 for 90 days or more, and if list approved automatically delete the accounts, click here.)
|
| · | move account within a server (change group / [W2k script only] OU)
|
| · | move account to another server
|
| · | If all ok
|
| · | save current data section (good to have if something goes wrong with the password sheets or for debugging purposes)
|
| · | delete current data file (if not deleted it will be run twice)
|
| · | write information event to event log with number of accounts created, enabled, deleted etc.
|
| · | If error
|
| · | write error event to event log
|
| · | send e-mail to administrator
|
| · | save script with current marker position* - possible to retry / continue
|
| · | stop processing of more data files until the error is solved*
|
| · | [W2k script only] Domain name = "D2.acme.com" -> [Settings]: "SET ADDomainPath=dc=com/dc=acme/dc=D2".
|
| · | Server name = "\\EDU8" -> [Machines]
|
| · | Root directory for home directories -> [Settings]: "SET HomeRoot=w:\users"
|
| · | Attachments working directory -> [Settings]: "SET DataFilesDir=c:\data"
|
| · | Data section backup directory -> [Settings]: "SET DataSectionBackupDir=c:\databck"
|
| · | Blat install path -> [Settings]: "SET BlatPath=c:\blat"
|
| · | Mail server, e-mail user and password for attachments -> [DataFiles]: "$GetDataFiles" row
|
| · | Mail server and e-mail address for error messages -> [OnError]: "DOS %BlatPath%\blat.exe" row
|
| · | Printer template for Data.PrintRow
|
| · | The contents of the [DataFiles] section and the [Data] section is replaced by the script when you run it - please remember to make any script changes in the original script.
|
| · | Be very careful when evaluating the script; try and verify all possible control field combinations before letting the script run by itself.
|
| · | Do not use the schedule service before the script is fully working:
|
| · | First run the script in GUI mode by clicking the "Run batch" button
|
| · | When everything works in GUI mode, try running the script from the command prompt
|
| · | When everything works from the command prompt, use the schedule service
|
| · | If you are having problems; remove the double backslashes before the "BatchSettings.Debug=Yes" row in [Settings] - this setting causes SetupBatcher to:
|
| · | Show all DOS commands in a dialog before they are executed
|
| · | Run in a GUI window even when called from the command prompt
|
| · | Use the Schedule service to run the script every night at 4:00 am.
|
| · | At the command prompt, type -
|
| · | Right-click the desktop, choose new / shortcut. I
|
| · | n the target field type -
|
| · | Add a data.show command to the [Init batch] section, example -
|
| · | Edit the $GetDataFiles command and set method to FTP
|
| · | Remove the [DataFiles] section
|
| · | Replace the line "DOS del %DataFilesDir%\%DataFile%" in the [Batch] section with "DOS del w:\data.txt".
|
| · | Add a data.load command to the [Init batch] section, example -
|