PDA

View Full Version : Batch Files


clickmike
09-11-2009, 12:48 PM
Hi,

I would like to automate most of what I need to do with my Server and from what I read it would be adventageous to learn how to program in this language so that I can create my own bat files.

In the DC I would like to Map Drives, Printers with the logon script and then do a clean up when the user logs off. I would like parameters that read variables so that I only need one script and not many scripts with static assignments. So if 'x' user logs on it knows that since it's an accountant that it will map all the proper accounting shares and printers.

I would also like to automates tasks via the scheduler. By automating the backing up of the DC, server state and defragging the hard drives. I believe this can all be done via bat scripting, right?

So, what is the best resource to learn this language? Does TrainSignal have anything that can help?

I just want to be able to learn what I need to be more effective, I do not want to learn a new programming language, like C++ and become a programmer too.

Thanks,
Mike

texasit
09-11-2009, 01:35 PM
Hi,

I would like to automate most of what I need to do with my Server and from what I read it would be adventageous to learn how to program in this language so that I can create my own bat files.

In the DC I would like to Map Drives, Printers with the logon script and then do a clean up when the user logs off. I would like parameters that read variables so that I only need one script and not many scripts with static assignments. So if 'x' user logs on it knows that since it's an accountant that it will map all the proper accounting shares and printers.

I would also like to automates tasks via the scheduler. By automating the backing up of the DC, server state and defragging the hard drives. I believe this can all be done via bat scripting, right?

So, what is the best resource to learn this language? Does TrainSignal have anything that can help?

I just want to be able to learn what I need to be more effective, I do not want to learn a new programming language, like C++ and become a programmer too.

Thanks,
Mike

Well to learn this I would suggest you know how to do it on the GUI first then automate it by scripts.I would suggest learning powershell or Vbscript.

clickmike
09-11-2009, 02:04 PM
Hmm...well that wasn't the answer I was hoping for...learn VB.

Is there a code library then? I'm sure I am not the first one to ask this so I imagine that there are others who have already done this so why reinvent the wheel.

Would there be a good resource somewhere for code snippets to accomplish some of the basic tasks I asked about in my original post?

Thanks,
Mike

Biggles77
09-12-2009, 10:48 AM
There is a plethera of scripting sites in cyber space.

http://www.google.com.au/search?hl=en&q=visual+basic+scripts&btnG=Search&meta=

or visit

http://blogs.technet.com/heyscriptingguy/archive/2009/09/11/hey-scripting-guy-september-11-2009.aspx