Uh-oh, it looks like your Internet Explorer is out of date.

For a better shopping experience, please upgrade now.

Automating Windows Administration / Edition 1

Automating Windows Administration / Edition 1

5.0 1
by Stein Borge, Gary Cornell

ISBN-10: 1590593979

ISBN-13: 9781590593974

Pub. Date: 09/23/2004

Publisher: Apress

Author Stein Borge has written a problem and solution-oriented text. In this follow-up edition, he thoroughly explains automating common administrative tasks for all business versions of Windows that rely on the Windows Script Host (WSH).

This book introduces new features of recent WSH versions, then discusses file, shell, and network


Author Stein Borge has written a problem and solution-oriented text. In this follow-up edition, he thoroughly explains automating common administrative tasks for all business versions of Windows that rely on the Windows Script Host (WSH).

This book introduces new features of recent WSH versions, then discusses file, shell, and network operations using built-in WSH objects. Also included are lesser-known, but still important additions to WSH and registry operations.

Product Details

Publication date:
Edition description:
Product dimensions:
7.00(w) x 9.25(h) x 1.66(d)

Table of Contents

About the Authorxvii
About the Technical Reviewerxix
Chapter 1Introduction1
What Is WSH?1
COM Automation2
Version 2.0 Features4
Scripting Components12
Streams, Standard Input and Output, and Piping35
Additional Resources37
Chapter 2Shell Operations39
2.1Reading the Command-Line Arguments39
2.2Reading an Environment Variable46
2.3Creating or Updating an Environment Variable48
2.4Deleting an Environment Variable51
2.5Running Applications52
2.6Accessing Windows-Related Folders58
2.7Creating a Windows Shortcut60
2.8Displaying a Message Prompt63
2.9Sending Keystrokes to Applications65
Chapter 3Logon Scripts and Scheduling71
3.1Connecting Network Resources at Logon71
3.2Scheduling Scripts79
3.3Displaying a Logon Message86
3.4Performing Operations Based on Group Membership95
3.5Creating an Inventory of Computers at Logon102
Chapter 4Networking Resources107
4.1Identifying a User107
4.2Finding an Available Network Drive108
4.3Mapping Network Drives110
4.4Migrating File Services from One Server to Another Server112
4.5Connecting to a Network Printer115
4.6Listing Connected Network Printers117
4.7Disconnecting Network Printers118
Chapter 5File Operations121
5.1Determining the Readiness of a Floppy Drive122
5.2Listing the Drives on a System124
5.3Finding the Size of a User Directory125
5.4Determining the Size of a File127
5.5Reading and Changing File Attributes128
5.6Determining the Existence of a File or Folder131
5.7Renaming a File or Folder132
5.8Comparing Files by Version Number133
5.9Creating a Folder135
5.10Finding and Deleting Temporary Files137
5.11Finding Files That Meet Criteria140
5.12Deleting a Folder144
5.13Copying a File145
5.14Copying and Moving a Folder147
5.15Deleting a File148
5.16Creating and Writing to a Text File149
5.17Opening and Reading a File151
5.18Updating a Text File153
Chapter 6Input/Output Streams157
6.1Using Regular Expressions to Filter the Contents of an Input Stream157
6.2Reading Keyboard Input163
6.3Generating Template-Based Data164
6.4Creating Multiple-User Prompts170
Chapter 7Registry Operations175
7.1Reading a Value from the Registry176
7.2Writing a Value to the Registry180
7.3Deleting a Registry Entry184
7.4Listing the Registry Key Values186
7.5Searching and Replacing Registry Values188
7.6Accessing the Remote Registry192
Chapter 8Regular Expressions195
8.1Validating a String196
8.2Matching Multiple Patterns203
8.3Matching Subexpressions206
8.4Replacing Values211
Chapter 9Application Automation215
9.1Creating Formatted Word Documents215
9.2Identifying Office Documents by Their Properties227
9.3Importing Data into Excel231
9.4Generating Thumbnail Images for Web Pages240
9.5Building Web Page Rollover Images244
9.6Generating Electronic Copies of Access Reports246
Chapter 10Network Administration/WMI249
10.1Accessing Information about a Computer251
10.2Determining the Role of a Computer263
10.3Obtaining IP Information265
10.4Changing the Location of an NT Dump File275
10.5Setting TCP/IP Information279
10.6Inventorying Computer Components288
10.7Executing Generic WMI Queries292
10.8Changing Environment Variables298
10.9Terminating a System Process300
10.10Starting an Application on a Remote Computer304
10.11Compressing Folders and Files309
10.12Copying Files on a Remote Computer312
10.13Rebooting a Computer316
10.14Checking the Event Viewer for Unauthorized Access320
10.15Backing Up Event Viewer Events327
10.16Processing Event Viewer Events329
10.17Changing NT Service Account Information333
10.18Changing System Time336
10.19Defragging a Drive338
10.20Listing DNS Resources341
10.21Creating a DNS Zone345
10.22Modifying DNS Zone Properties350
10.23Creating DNS Address351
10.24Deleting DNS Resources355
10.25Modifying DNS Addresses356
Chapter 11Internet Applications359
11.1Retrieving HTML Data359
11.2Displaying HTML364
11.3Displaying an HTML Logon Message369
11.4Creating an HTML Form373
11.5Enumerating HTML Elements378
11.6Creating a GUI Menu387
11.7Transferring Files Using FTP390
11.8Domain Name Resolution396
11.9Pinging a Computer398
Chapter 12Messaging Operations403
12.1Logging On405
12.2Determining the Default Profile409
12.3Sending Anonymous Mail411
12.4Running Message Scripts Using NT Scheduler Service413
12.5Creating a Mail Message416
12.6Setting Message Properties417
12.7Creating Message Recipients419
12.8Sending the Message422
12.9Using a Command-Line Script to Send E-mail426
12.10Checking the Event Log432
12.11Getting Computer Status Notification433
12.12Using the Performance Monitor Event435
12.13Attaching Files to a Message436
12.14Processing Messages439
12.15Filtering Mail441
12.16Extracting Attachments444
12.17Using a WSH Script Mail Agent446
12.18Retrieving a Folder451
12.19Posting Messages to an Exchange Server Public Folder456
12.20Creating Folders457
12.21Copying or Moving Messages459
12.22Copying and Moving Folders462
12.23Deleting Messages and Folders464
12.24Creating New Message Fields465
12.25Retrieving an Address Book Recipient468
12.26Creating Recipient Entries472
12.27Adding a Distribution List474
Chapter 13Data Access477
Using ADO478
13.1Data Source Name Connection Strings480
13.2File DSN Connection485
13.3DSN-Less Connection Strings487
13.4Opening a Secure Database492
13.5Compacting Access Databases495
13.6Querying a Table500
13.7Opening a Table for Writing504
13.8Manipulating a Text File508
13.9Accessing Excel Data510
13.10Querying the Index Server513
13.11Adding Data515
13.12Updating Data518
13.13Accessing HTML Data520
13.14Deleting Data524
13.15Accessing Internet Resources525
13.16Exporting Data535
13.17Importing Data537
13.18Executing a Stored Procedure552
13.19Executing an Access Parameter Query556
13.20Processing Multiple Recordsets558
13.21Modifying Command Results559
13.22Returning a Parameter Value from a Stored Procedure561
13.23Transaction Processing571
Chapter 14System Administration575
14.1Setting Domain Properties576
14.2Determining a Computer's OS582
14.3Listing Users584
14.4Creating a New User586
14.5Listing Object Properties589
14.6Setting Object Properties592
14.7Setting Multivalued Properties605
14.8Deleting a User607
14.9Setting User Logon Time608
14.10Limiting Computer Access614
14.11Setting User Flags615
14.12Listing Groups619
14.13Creating or Deleting a User Group620
14.14Adding a User or Group to a Group622
14.15Determining Group Membership624
14.16Querying Active Directory Values625
14.17Controlling NT Services630
14.18Listing Connected Resources636
14.19Determining User RAS Access638
14.20Listing Network Shares642
14.21Creating or Deleting a Network Share643
14.22Print Queue Operations645
14.23Listing Print Jobs647
14.24Setting Windows Terminal Services Properties651
Chapter 15Internet Information Server655
15.1Backing Up and Restoring IIS Configuration Information656
15.2Listing Web Sites662
15.3Creating a Site666
15.4Starting an IIS Site674
15.5Deleting a Site675
15.6Creating Virtual Web Directories677
15.7Setting File and Directory Properties679
15.8Creating a Web Directory Application685
15.9Maintaining Server Bindings689
15.10Setting IP Security691
Chapter 16Exchange Server695
16.1Creating a Mailbox695
16.2Setting Mailbox Properties710
16.3Setting Mailbox Limits717
16.4Creating a Custom Recipient719
16.5Maintaining Mailbox E-mail Addresses722
16.6Creating a Distribution List725
16.7Enumerating a Distribution List727
16.8Creating a Recipients Container729
16.9Deleting an Exchange Object732
16.10Searching an Exchange Server733
Chapter 17Security739
17.1Setting NT Share Security740
17.2Setting File Permissions751
17.3Setting Directory Security759
17.4Changing User Access to the Exchange 5.5 Recipients Container773
17.5Copying a File with Its Security Settings777
17.6Taking Ownership of Files780
17.7Setting Active Directory Permissions781

Customer Reviews

Average Review:

Post to your social network


Most Helpful Customer Reviews

See all customer reviews

Automating Windows Administration 5 out of 5 based on 0 ratings. 1 reviews.
Guest More than 1 year ago
A major portion of the Total Cost of Ownership of a group of computers is the cost of the sysadmin who has to maintain them. Given Microsoft's dominance of the desktop, this book should be of interest to sysadmins or their supervisors. A little ironically, the material in the book tends towards a unix-type style of administration. As you may know, historically, unix machines predated any UI, and they still emphasise scripting languages for sysadmins to use and modify. These led to unix sysadmins having very powerful scripts that might be scheduled for regular, automated runs. Well, if you are a Microsoft syadmin, you probably started from and tend to stay within a UI. Which is great for manual tasks. But here, Borge shows how you can hone your skills at the command line, and why this is vital for automating common tasks. Of course, the book is not entirely about scripting. But I'm giving you the gist. The promise of the book is that it can round out and enhance your skills in this important direction. Plus the book also opens up another opportunity. If you get comfortable enough at the command line with writing scripts and using them, then a sideways shift into running unix/linux machines is not that difficult. At a fundamental level, the ideas discussed in the book tend to have similar implementations under unix. So the book can expand your career prospects, and not just in the obvious way indicated by the book.