Dela via


Useful Scripts

I like to write scripts.  I really enjoy automating some boring task and then walking away from it.  Who knows, maybe deep down I secretly desire to be a programmer... 

Over the years I have written a number of scripts for customers from simple batch files to more complicated scripts to manage Active Directory.  For example a few years ago while working as a consultant I was told we needed to remove the Novell IPX/SPX protocol from approximately 2000 computers now that AD was installed and working correctly.  The customer was putting together a plan to have the help desk staff visit each desktop to perform this task and asked me to write a step by step document of the procedure to remove the IPX/SPX protocol.  Instead I wrote a script that was used to programmatically remove the protocol remotely and write the status of each computer to a log file.  It took us just a few days to target all the computers with the script from their headquarters in Washington, DC to offices all over the US. 

In todays world, administrators have a vast number of tools at their disposal that should enable them to automate most, if not all administrative tasks.  Between the command line tools in the Resource Kits, Supports tools and the various scripting interfaces provided by COM objects, an administrator should never have to leave their chair. 

As time permits, I'll dig some of these out of the archives and post them here for others to use or build upon.  But first the the DISCLAIMER.

The sample scripts provided here are not supported under any Microsoft standard support program or service. All scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.

In other words, the scripts you will find here written by me, for my use. They may or may not work for you.  If you choose to use them, you do so at your own risk.  Make sure you test these in a non-production environment first and know how they work and what they will do.

 OK, now that all that is out of the way, on to the scripts.  Links to each script are listed below.  Check back from time to time for updates.  Feel free to comment on any scripts you find useful and let me know if you have suggestions for improving a script.  


Scripts

FileCopy
This FileCopy.vbs script performs a very simple task - it copies a file to the same directory on a number of computers. 

Using the FOR command
There are a number of useful command-line utilities that can be used to manage remote computers.  The FOR command enables you to run a command ageist several computers of files.  For example the command line below can be used to ping (DO ping) the first item on each line (tokens=1) in the file input.txt.

Comments

  • Anonymous
    January 03, 2007
    I have a link in the left navigation bar to a page where I will begin posting some scripts I have written.