|
I similarly got to a
point where I realized I couldn’t practically avoid scripting any
longer. I looked at a few books, including Robbie’s AD
Cookbook. Eventually I have become a pretty fair scripter in _vbscript_ and
can work my way around jscript with only minimal pain. Here are a couple
of things I learned, though. 1)
_vbscript_ is nice because from Win2K and up, it’s supported out
of the box in WSH. No interpreter to load, and no compiling
necessary. It does have it’s limitations, to be sure, but it is
fairly easy to learn. An advantage over compiling a perl script is if you
are out in the field with a script you need, and it doesn’t work on the
box you need it for, you can open it up in notepad and fix it. This
happens (for me anyway) more than you might imagine. 2)
I can’t remember all the stuff like Set oFSO = CreateObject(“Scripting.FileSystemObject”)
and so on, or the set of lines to write to text files, etc. So like any
good web programmer, I have accumulated a folder of example scripts that do
certain things. i.e. parse a csv file, write a log file, find various AD
attributes, manipulate msi databases, etc. If I don’t have a set of
code to do something, I can easily find it out there on the web and adapt it.
Almost everything I’ve written started out as something else –
including plagiarizing my own scripts. 3)
The Windows Platform Software Development Kit is invaluable.
There is a scripting reference to all the methods, functions, etc and when I am
charting new territory, I have it open all the time. All the ADSI
methods, objects, functions, and properties are in there too. The SDK is
freely downloadable from Microsoft. http://www.microsoft.com/msdownload/platformsdk/sdkupdate/XPSP2FULLInstall.htm
4)
The Microsoft Scripting Guys have lots of cool stuff on their
site. The WMI Scriptomatic 2 is awesome for showing how to do
things. Even if you are not doing WMI but rather AD, it shows you how to
create and use objects and query properties. http://www.microsoft.com/technet/scriptcenter/default.mspx
5)
If you don’t have a good tool for scripting, get one.
There are several, and I think that the free Microsoft Visual Studio 2005
Express will do _vbscript_. I know it does hta files. Autocomplete is
another invaluable tool once you learn to use it, for all but the most prolific
scripters (like joe I imagine J) 6)
Consider looking at HTA (HTML Application) files. They are
HTML, so familiar if you know any web coding, but they don’t have the
limitations IE puts on htm files – i.e. you can access the file system
etc. They enable you to harness a web interface to use in your
scripts. A lot of recent Microsoft stuff is on HTA now. ----------------------------------------------------------------------- From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stu Packett Hello everyone. After reading through a lot of the posts on this
mailing list, I realize I could make my job easier if I knew how to
script. I have no experience in scripting, but would like to know what
books do you recommend as a beginner's book on scripting? Also, I don't
really know the difference between WSH and _vbscript_, so if anyone could explain
that, I'd appreciate that. After browsing through Amazon, I saw several
books on WSH and _vbscript_, but don't know where I should focus on. I'm
also open to computer based training (CBT) videos of any exist. Thanks in
advance.
|
- Re: [ActiveDir] Beginner's Book on Scripting - WSH or ... AFidel
- RE: [ActiveDir] Beginner's Book on Scripting - WS... Darren Mar-Elia
- [ActiveDir]event log monitoring. Ramon Linan
- RE: [ActiveDir]event log monitoring. Wells, James Arthur
- RE: [ActiveDir]event log monitoring. Free, Bob
- RE: [ActiveDir]event log monitoring. Alex Alborzfard
- RE: [ActiveDir] Beginner's Book on Scripting - WSH or ... Dave Wade
- RE: [ActiveDir] Beginner's Book on Scripting - WSH or ... Brian Desmond
- RE: [ActiveDir] Beginner's Book on Scripting - WSH or ... Scott, Anthony
- RE: [ActiveDir] Beginner's Book on Scripting - WSH or ... joe
- RE: [ActiveDir] Beginner's Book on Scripting - WSH or ... Rich Milburn
- RE: [ActiveDir] Beginner's Book on Scripting - WSH or ... Larry Beck
