Scripting Language

Discussion in 'Scripting' started by Matthew Good, Jun 22, 2009.

  1. Matthew Good

    Matthew Good Guest

    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.
     
    Matthew Good, Jun 22, 2009
    #1
    1. Advertisements

  2. Matthew Good

    Al Dunbar Guest

    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
     
    Al Dunbar, Jun 22, 2009
    #2
    1. Advertisements

  3. Matthew Good

    Matthew Good Guest

    My goal right now is to automate the creation and removal of users in
    active directory and associated user directories.
     
    Matthew Good, Jun 23, 2009
    #3
  4. Admin logon/logoff scripting tends to center around WSH scripts using the
    VBScript language.
     
    Alex K. Angelopoulos, Jun 23, 2009
    #4
  5. Matthew Good

    Matthew Good Guest

    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.
     
    Matthew Good, Jun 23, 2009
    #5
  6. Have a look at this authoritative site for VB Scripts dealing with AD
    issues: http://www.rlmueller.net.
     
    Pegasus [MVP], Jun 23, 2009
    #6
  7. 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], Jun 23, 2009
    #7


  8. 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
     
    Mark D. MacLachlan, Jul 1, 2009
    #8
  9. Matthew Good

    Bill Stewart Guest

    Or JScript. :)
     
    Bill Stewart, Jul 1, 2009
    #9
  10. 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...
     
    Alex K. Angelopoulos, Jul 2, 2009
    #10
  11. Matthew Good

    Al Dunbar Guest

    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
     
    Al Dunbar, Jul 3, 2009
    #11
  12. 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?
     
    Mark D. MacLachlan, Jul 3, 2009
    #12
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.