Home All Groups Group Topic Archive Search About
Author
22 Jun 2009 5:01 PM
Matthew Good
I'm really new to scripting Windows servers and I'm rather curious as to
what the scripting language of choice is or what the best language for
it is?

I'll be working mainly with Windows 2008 and 2003 Servers.  I don't have
any major plans at this point to do any desktop scripting outside of
login and logout scripts.

Author
22 Jun 2009 9:25 PM
Al Dunbar
"Matthew Good" <"system[delete]tyrant"@g[ee]mail.com> wrote in message
news:u$uAns18JHA.2604@TK2MSFTNGP05.phx.gbl...
> I'm really new to scripting Windows servers and I'm rather curious as to
> what the scripting language of choice is or what the best language for it
> is?
>
> I'll be working mainly with Windows 2008 and 2003 Servers.  I don't have
> any major plans at this point to do any desktop scripting outside of login
> and logout scripts.

That rather depends on which languages you might already have some
familiarity with, and what type of operations you want to script. Those with
a strong backing in vbscript are likely to stay there; those with little
experience might be in a better position to go to powershell. But before
making that choice, you will need to determine whether or not it is already
installed on your w2k3 servers, and, if not, whether or not your
organization will allow you to install it.

A third option is batch. It is admittedly rather weak for doing anything
beyond copying files around, but a reasonable knowledge of it is a
worthwhile thing to maintain, as it is often the quickest solution to the
simpler problems.

So, what, precisely, do you intend to do with scripting?

/Al
Author
23 Jun 2009 1:02 PM
Matthew Good
My goal right now is to automate the creation and removal of users in
active directory and associated user directories.
Author
23 Jun 2009 1:50 PM
Alex K. Angelopoulos
"Matthew Good" <"system[delete]tyrant"@g[ee]mail.com> wrote in message
news:u$uAns18JHA.2604@TK2MSFTNGP05.phx.gbl...
> I'm really new to scripting Windows servers and I'm rather curious as to
> what the scripting language of choice is or what the best language for it
> is?
>
> I'll be working mainly with Windows 2008 and 2003 Servers.  I don't have
> any major plans at this point to do any desktop scripting outside of login
> and logout scripts.

Admin logon/logoff scripting tends to center around WSH scripts using the
VBScript language.
Author
23 Jun 2009 2:15 PM
Matthew Good
At this point I'm more interesting in creating a script to automate the
creation and deletion of users in AD and a user directory.
Author
23 Jun 2009 2:35 PM
Pegasus [MVP]
"Matthew Good" <"system[delete]tyrant"@g[ee]mail.com> wrote in message
news:uKNQl0A9JHA.1376@TK2MSFTNGP02.phx.gbl...
> At this point I'm more interesting in creating a script to automate the
> creation and deletion of users in AD and a user directory.

Have a look at this authoritative site for VB Scripts dealing with AD
issues: http://www.rlmueller.net.
Author
23 Jun 2009 2:50 PM
Richard Mueller [MVP]
"Pegasus [MVP]" <n***@microsoft.com> wrote in message
news:ONhPl$A9JHA.2604@TK2MSFTNGP05.phx.gbl...
>
> "Matthew Good" <"system[delete]tyrant"@g[ee]mail.com> wrote in message
> news:uKNQl0A9JHA.1376@TK2MSFTNGP02.phx.gbl...
>> At this point I'm more interesting in creating a script to automate the
>> creation and deletion of users in AD and a user directory.
>
> Have a look at this authoritative site for VB Scripts dealing with AD
> issues: http://www.rlmueller.net.
>

PowerShell is the latest scripting language from Microsoft, but it requires
the .NET Framework. Also, the AD module that allows PowerScript programs to
interact with AD requires Windows Server 2008 on a 64-bit machine (or
possibly third party add-on components). Also, PowerShell syntax is more
similar to batch file programs. It uses piping and redirection extensively.
I feel it is harder to read and understand unless you use it all the time.

For now I would recommend VBScript, both for logon scripts and AD
Administrative tasks. An example VBScript program to create users in bulk
from the information in an Excel spreadsheet:

http://www.rlmueller.net/CreateUsers.htm

The program can create and assign home directories. A VBScript program can
be written to delete user objects, if there is a source of user names
(Distinguished Names or "pre-Windows 2000 logon" names). You could read
names from a text file or spreadsheet. The steps to delete one specified
user is demonstrated in this link from the Script Center:

http://www.microsoft.com/technet/scriptcenter/scripts/ad/users/manage/usmgvb07.mspx

However, you might want to use Joe Richards' free oldcmp utility:

http://www.joeware.net/freetools/tools/oldcmp/index.htm

It is highly recommended for finding and cleaning up unused user accounts,
as well as computer accounts.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
Author
1 Jul 2009 10:04 PM
Bill Stewart
Alex K. Angelopoulos wrote:

> Admin logon/logoff scripting tends to center around WSH scripts using
> the VBScript language.

Or JScript. :)

--
Bill Stewart
Author
2 Jul 2009 5:39 PM
Alex K. Angelopoulos
I was simplifying it to the path of least resistance. If Matthew has a
background in web development that he didn't mention, however, JScript would
definitely be the quickest route...

Show quoteHide quote
"Bill Stewart" <llib.traw***@yrautromhcnerf.moc> wrote in message
news:eeDkbfp#JHA.5780@TK2MSFTNGP03.phx.gbl...
> Alex K. Angelopoulos wrote:
>
>> Admin logon/logoff scripting tends to center around WSH scripts using the
>> VBScript language.
>
> Or JScript. :)
>
> --
> Bill Stewart
Author
1 Jul 2009 3:59 AM
Mark D. MacLachlan
Matthew Good wrote:

> I'm really new to scripting Windows servers and I'm rather curious as
> to what the scripting language of choice is or what the best language
> for it is?
>
> I'll be working mainly with Windows 2008 and 2003 Servers.  I don't
> have any major plans at this point to do any desktop scripting
> outside of login and logout scripts.



My language of choice is VBScript.  I've written a rather extensive FAQ
on VBScript login scripts here:
http://www.tek-tips.com/faqs.cfm?fid=5798.  Hope it helps.

Mark
Author
3 Jul 2009 1:13 AM
Al Dunbar
Show quote Hide quote
"Mark D. MacLachlan" <markd***@live.com> wrote in message
news:egoETBg#JHA.4900@TK2MSFTNGP02.phx.gbl...
> Matthew Good wrote:
>
>> I'm really new to scripting Windows servers and I'm rather curious as
>> to what the scripting language of choice is or what the best language
>> for it is?
>>
>> I'll be working mainly with Windows 2008 and 2003 Servers.  I don't
>> have any major plans at this point to do any desktop scripting
>> outside of login and logout scripts.
>
>
>
> My language of choice is VBScript.  I've written a rather extensive FAQ
> on VBScript login scripts here:
> http://www.tek-tips.com/faqs.cfm?fid=5798.  Hope it helps.
>
> Mark

Richard Mueller is generally considered the authority in this area, at least
in my opinion as well as that of countless others he has assisted here:

    http://www.rlmueller.net/freecode2.htm


/Al
Author
3 Jul 2009 5:36 AM
Mark D. MacLachlan
Richard is an amazing scriptor and an awesome source of knowledge, no
argument from me on that.

I'm overcome by the warm welcome you folks give to new people who come
to these forums to try and help others.

Why is it that there seems to be some kind of turf war here?  In what
way does my sharing my FAQ deminish the great work that Richard or
anyone else has done in this forum?  Why is it necessary to dismiss the
work of others just because they are new to these forums?
Author
3 Jul 2009 5:56 AM
Mark D. MacLachlan
Al Dunbar wrote:

Show quoteHide quote
>
> "Mark D. MacLachlan" <markd***@live.com> wrote in message
> news:egoETBg#JHA.4900@TK2MSFTNGP02.phx.gbl...
> > Matthew Good wrote:
> >
> > > I'm really new to scripting Windows servers and I'm rather
> > > curious as to what the scripting language of choice is or what
> > > the best language for it is?
> > >
> > > I'll be working mainly with Windows 2008 and 2003 Servers.  I
> > > don't have any major plans at this point to do any desktop
> > > scripting outside of login and logout scripts.
> >
> >
> >
> > My language of choice is VBScript.  I've written a rather extensive
> > FAQ on VBScript login scripts here:
> > http://www.tek-tips.com/faqs.cfm?fid=5798.  Hope it helps.
> >
> > Mark
>
> Richard Mueller is generally considered the authority in this area,
> at least in my opinion as well as that of countless others he has
> assisted here:
>
>    http://www.rlmueller.net/freecode2.htm
>
>
> /Al

Having re-read your reply Al, I realize that there are two ways to read
the intent of your message.  My reply comes after being flamed in
another thread and I believe I may have misinterpretted your
intentions.  If that is the case please accept my apologies.

--
Author
3 Jul 2009 1:43 PM
Al Dunbar
Show quote Hide quote
"Mark D. MacLachlan" <markd***@live.com> wrote in message
news:usDi9L6#JHA.4692@TK2MSFTNGP02.phx.gbl...
> Al Dunbar wrote:
>
>>
>> "Mark D. MacLachlan" <markd***@live.com> wrote in message
>> news:egoETBg#JHA.4900@TK2MSFTNGP02.phx.gbl...
>> > Matthew Good wrote:
>> >
>> > > I'm really new to scripting Windows servers and I'm rather
>> > > curious as to what the scripting language of choice is or what
>> > > the best language for it is?
>> > >
>> > > I'll be working mainly with Windows 2008 and 2003 Servers.  I
>> > > don't have any major plans at this point to do any desktop
>> > > scripting outside of login and logout scripts.
>> >
>> >
>> >
>> > My language of choice is VBScript.  I've written a rather extensive
>> > FAQ on VBScript login scripts here:
>> > http://www.tek-tips.com/faqs.cfm?fid=5798.  Hope it helps.
>> >
>> > Mark
>>
>> Richard Mueller is generally considered the authority in this area,
>> at least in my opinion as well as that of countless others he has
>> assisted here:
>>
>>    http://www.rlmueller.net/freecode2.htm
>>
>>
>> /Al
>
> Having re-read your reply Al, I realize that there are two ways to read
> the intent of your message.  My reply comes after being flamed in
> another thread and I believe I may have misinterpretted your
> intentions.  If that is the case please accept my apologies.
>
> --

Gracious apology accepted. As with your post that you refer to, I was simply
providing more information, not refuting or diminishing anything that went
before.

One thing I have learned here is that misunderstandings arise very easily.
The best response to what appears as a personal attack is to not take
offense. I just assume that everyone's intentions here are, generally, good.
Lots of room for disagreement, but on technical issues, not personal ones.

/Al
Author
3 Jul 2009 4:17 PM
Mark D. MacLachlan
Thank you Al.  Like you I just want to help and allowed frustration
over another thread to get the best of me.  I'm glad cooler heads have
prevailed.  Have a great day.