My Account Log in

1 option

VBScript, WMI and ADSI unleashed : using VBSscript, WMI, and ADSI to automate Windows administration

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Jones, Don, Author.
Language:
English
Subjects (All):
Microsoft Windows (Computer file).
VBScript (Computer program language).
Directory services (Computer network technology).
Physical Description:
1 online resource (576 pages)
Edition:
2nd edition
Place of Publication:
[Place of publication not identified] Sams 2007
Language Note:
English
System Details:
text file
Summary:
If you’re a Windows administrator, scripting expertise can liberate you from boring, repetitive work–so you can take on the sophisticated, high-value projects you really want. Top scripting guru Don Jones has written the definitive administrator’s guide to getting results with Microsoft’s key scripting technologies: VBScript, WMI, and ADSI. Jones draws on his unsurpassed experience training Windows administrators in conferences, classes, and from his enormously popular site, ScriptingAnswers.com. You’ll learn how to use VBScript, WMI, and ADSI to gain administrative control over nearly every aspect of every recent Windows server or client, including Windows Server 2003, Vista, XP, 2000, and NT. As you gain experience, Jones introduces more advanced techniques, ranging from modular scripting and script encryption to integrating VBScript with HTML code. Jones concludes with a full section of ready-to-run, real-world examples–from logon/logoff scripts to automated domain and network administration, from querying WMI to creating Active Directory groups. Every script is explained line-by-line, with challenging techniques described in even greater detail. Detailed information on how to… Decide what you can script: a framework for getting started fast Understand how scripts are designed, assembled, and run Master VBScript from start to finish: functions, I/O, data manipulation, program flow, and much more Use scripting objects for tasks ranging from retrieving network information to mapping drives Utilize FileSystemObject to manipulate the Windows filesystem Write ADSI scripts to manipulate any directory service your company uses, from Active Directory to Novell NDS Modify domain information, users, groups, and policies Query WMI information–from basic to advanced Plan for errors, and test and debug your scripts Build your own “resource kit” of reusable script components ON THE WEB: Download all examples and source code presented in this book from ScriptingAnswers.com, where you’ll also be able to post follow-up questions directly to the author in a moderated, active community. Introduction 1 Part I: Introduction to Windows Administrative Scripting 11 Chapter 1: Scripting Concepts and Terminology 13 Chapter 2: Running Scripts 21 Chapter 3: The Components of a Script 39 Chapter 4: Designing a Script 55 Part II: VBScript Tutorial 73 Chapter 5: Functions, Objects, Variables, and More 75 Chapter 6: Input and Output 101 Chapter 7: Manipulating Numbers 115...
Contents:
Cover
Contents
Introduction
Who Should Read This Book?
How to Use This Book
Part I: Introduction to Windows Administrative Scripting
Part II: VBScript Tutorial
Part III: Windows Management Instrumentation and Active Directory Services Interface
Part IV: Advanced Scripting Techniques
Part V: Ready-to-Run Examples
Appendix
Preparing to Use This Book
Typographical Elements
Sample Scripts
Sample Scripts-Explained
1 Scripting Concepts and Terminology
Overview of Scripting
Script Hosts
ActiveX Scripting Languages
The Component Object Model (COM)
Critical Scripting Security Issues
VBScript Versus Windows PowerShell
Summary
2 Running Scripts
Windows Script Host
Command-Line Scripts
Notepad and Script Editors
Writing Your First Script
Running Your First Script
Debugging Your First Script
3 The Components of a Script
A Typical VBScript
Functions
Subroutines
Main Script
Comments and Documentation
4 Designing a Script
Creating a Task List
Selecting the Appropriate Tools
Creating Modules to Perform Tasks
Validating User Input
Planning for Errors
Creating Script Libraries
5 Functions, Objects, Variables, and More
Variables Defined
Functions Defined
Statements and Subroutines Defined
Objects Defined
6 Input and Output
Displaying Messages
Asking for Input
Command-Line Parameters as Input
7 Manipulating Numbers
Numbers in VBScript
Basic Arithmetic
Advanced Arithmetic
Boolean Math
Converting Numeric Data Types
Converting Other Data Types to Numeric Data
8 Manipulating Strings
Strings in VBScript
Working with Substrings.
Concatenating Strings
Changing Strings
Formatting Strings
Converting Other Data Types to String Data
9 Manipulating Other Types of Data
Working with Dates and Times
Working with Arrays
Working with Bytes
10 Controlling the Flow of Execution
Conditional Execution
Loops
Putting It All Together
11 Built-In Scripting Objects
The WScript Object
The Network Object
The ADSystemInfo Object
The Shell Object
The Shortcut Object
Objects in Detail
12 Working with the File System
The FileSystemObject Library
Working with Drives
Working with Folders
Working with Files
Reading and Writing Text Files
Other FSO Methods and Properties
Creating a Log File Scanner
13 Putting It All Together: Creating Your First Script from Scratch
Designing the Script
Writing Functions and Subroutines
Writing the Main Script
Testing the Script
14 Working with ADSI Providers
Using ADSI Objects
Using the WinNT Provider
Using the LDAP Provider
Other Providers
15 Manipulating Domains
Querying Domain Information
Changing Domain Settings
Working with OUs
16 Manipulating Users and Groups
Creating Users and Groups
Querying User Information
Changing User Settings
Working with Groups
17 Understanding WMI
The WMI Hierarchy
Exploring WMI's Capabilities
Installing WMI
Using the WMI Tools
The Easy Way to Write WMI Scripts
18 Querying Basic WMI Information
The WMI Query Language (WQL)
Determining What to Query
Testing the Query
Writing the Query in VBScript
Using the Query Results.
Alternative Methods
19 Querying Complex WMI Information
Understanding WMI Relationships
Associating WMI Instances
Writing the Query
Another Example
20 Putting It All Together: Your First WMI/ADSI Script
21 Testing and Debugging WMI and ADSI Queries
Debugging Outside the Script
Debugging WMI Queries
Debugging ADSI Queries
22 Modular Script Programming
Looking for Modules
Introduction to Windows Script Components
Scripting and XML
23 Scripts Packaging and Protection
Installing the Script Encoder
Writing Encoded Scripts
Running Encoded Scripts
Encoding: The Downside
Script Packaging
24 Scripting Security
Why Scripting Can Be Dangerous
Security Improvements in Windows XP and Windows Server 2003
Digitally Signing Scripts
Running Only Signed Scripts
Ways to Implement Safe Scripting
25 Introduction to HTML Applications
Event-Driven Scripting
How an HTA Is Built
HTA Differences
Steps for Writing an HTA
26 Debugging Tips, Tools, and Techniques
Types of Bugs
Preventing Syntax Errors
Debugging Logic Errors
27 Logon and Logoff Scripts
NT and Active Directory Logon Scripts
Active Directory-Specific Logon Scripts
Active Directory Logoff Scripts
28 Windows and Domain Administration Scripts
Automating User Creation
Finding Inactive Users
Collecting System Information
Templates
29 Network Administration Scripts
Shutting Down Remote Computers
Listing Remote Shares.
Finding Out Who Has a File Open
Uninstalling Remote MSI Packages
Listing Hot Fixes and Software
30 WMI and ADSI Scripts
The All-Purpose WMI Query Script
The All-Purpose WMI Update Script
The All-Purpose ADSI Object Creation Script
The All-Purpose ADSI Object Query Script
The All-Purpose ADSI Object Deletion Script
Mass Password Changes with ADSI
Updating Service Accounts
Appendix: Administrator's Quick Script Reference
Index.
Notes:
Bibliographic Level Mode of Issuance: Monograph
Description based on publisher supplied metadata and other sources.
ISBN:
9786612649271
9781282649279
1282649272
9780768675085
0768675081
OCLC:
1027202194

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account