Re: Newbie needs Help Please
- From: "Justin Piper" <jpiper@xxxxxxxxx>
- Date: Wed, 13 Sep 2006 15:59:17 GMT
On Wed, 13 Sep 2006 10:25:05 -0500, McKirahan <News@xxxxxxxxxxxxx> wrote:
<zylinius1983@xxxxxxxxx> wrote in message
news:1158157786.913726.95600@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,
I have decided I need to learn how to script very badly. I have been
hired as the network administrator at a quickly growing company. I
want to right a script for adding our new hires, since this is going to
be a common proccess. I need to Add a user. create an email account.
add the user to a group. create a "home directory" that thier My
Documents points to on the server, A profile, grant access to our
sharepoint portal, grant access to Customer Service email accounts.
Can I do all this with one script? I would hate to miss a step, and
have problems when a large group of new hires start. Thanks for the
help
Hopefully, you mean
"I have decided I very badly need to learn how to script."
not
"I have decided I need to learn how to script very badly."
:)
And in the event that he ment the latter, here are some helpful tips:
* The first line in your script should always be "On Error Resume Next",
and never "Option Explicit".
* Name variables and functions after things on your desk.
* Remember that you can re-use the names of built-in functions when
writing your own improved versions
* Never use local variables; I for one don't trust things that cease to
exist when you stop observing them.
* Never return values from functions; it's redundant if you're following
the previous guideline.
* Never use function arguments; they are local variables in disguise.
* Take a page from Java and make a class for everything, including
primitive types.
* Never write comments unless they either repeat what the code says, or
contradict what the code says.
* Never name a temporary counter "i" or "j" or "count".
* Eval is your friend.
* Redim Preserve is slow, so just Dim arrays with the largest dimensions
you figure you'll need. 100 is a good starting point for most things.
* All your assumptions about caller are correct. Validating input is a
waste of time.
* Strategically ignore all of these guidelines here and there to throw
people off.
--
Justin Piper
Bizco Technologies
http://www.bizco.com/
.
- References:
- Newbie needs Help Please
- From: zylinius1983
- Re: Newbie needs Help Please
- From: McKirahan
- Newbie needs Help Please
- Prev by Date: Re: Newbie needs Help Please
- Next by Date: Re: Newbie needs Help Please
- Previous by thread: Re: Newbie needs Help Please
- Next by thread: Re: Newbie needs Help Please
- Index(es):
Relevant Pages
|