One of the secrets to the ever-increasing popularity of Windows Server can be found in the simplicity its administration. The easy-to-use GUI, consistent set of tools, and wizards that walk you through complex tasks allow you to install, configure and maintain Windows servers without any knowledge of programming or scripting languages or learning complicated command-line syntax. It's possible, in fact, to accomplish about 90% of all Windows administration without ever opening a command prompt or running a script!But what about the other ten percent of the time? While it's true that most common, day-to-day tasks of Windows administration can be performed from the GUI, it's not always the best way, especially with complex or repetitive tasks Scripts and command-line tools often provide a faster, more flexible approach. Windows Server Hacks reveals techniques that go well beyond basic management tasks found in most handbooks to help busy system administrators master the more powerful features of Windows Server.Windows Server Hacks focuses on scripts and other tools that will make your life as an administrator much easier. These tools, or hacks--quick and dirty solutions to problems, or clever ways of doing things--were created by other professionals who've also had to struggle to find solutions to administering Windows environments. You'll save valuable time using their scripts, tools, tips, and advice. Plus, you can easily learn to customize the scripts to create even more powerful tools for your own, specific needs.The book includes secrets of the masters in such areas as Active Directory, User Management, Group Policy, DNS and DHCP, File and Print, IIS, performance and security. The hundred, industrial strength hacks in the book range from those that deal with general administration to more esoteric hacks in the areas of network deployment, patch management, and backup and recovery.No matter which Windows server you use--NT, IIS, 2000, or 2003--this book will put the knowledge and expertise of veteran system administrators and hackers to work for you. Windows Server Hacks will make your life easier while expanding your understanding of the capabilities of Windows Server.

Chapter 1 General Administration

Hacks #1-16

Use Run As to Perform Administrative Tasks

Drag and Drop to the Run Menu

Find and Replace Registry Keys from a Command Line

Automatically Log On After Booting

Wait for and Optionally Terminate a Process

Shut Down a Remote Computer

Rename Mapped Drives

Execute a Command on Each Computer in a Domain

Add, Remove, or Retrieve Environment Variables

Extend Group Policy

Disable EFS

Get Event Log Information

Shortcut to Remote Assistance

Desktop Checker

Top Five Tools

myITforum.com

Chapter 2 Active Directory

Hacks #17-24

Retrieve the List of Old Domain Computer Accounts

Automate Creation of OU Structure

Modify All Objects in the OU

Delegate Control of an OU to a User

Send OU Information in Active Directory to an HTML Page

Display Active Directory Information

Store and Display Contact Information in Active Directory

Restore the Active Directory Icon in Windows XP

Chapter 3 User Management

Hacks #25-35

Search for Domain Users

Manage User Accounts in Active Directory

Get a List of Disabled Accounts

Get User Account Information

Check for Passwords that Never Expire

Enumerate Group Membership to a CSV File

Modify User Properties for All Users in a Particular OU

Check Group Membership and Map Drives in a Logon Script

Script Creation of a User’s Home Directory and Permissions

Prevent Ordinary Users from Creating Local Accounts

Put a Logoff Icon on the Desktop

Chapter 4 Networking Services

Hacks #36-47

Manage Services on Remote Machines

Simplify DNS Aging and Scavenging

Troubleshoot DNS

Manually Recreate a Damaged WINS Database

Change WINS for All Enabled Adapters

Ensure DHCP Server Availability

Change a Network Adapter’s IP Info

Change from Static IP to DHCP

Release and Renew IP Addresses

Use netsh to Change Configuration Settings

Remove Orphaned Network Cards

Implement Windows 2000 Network Load Balancing

Chapter 5 File and Print

Hacks #48-53

Map Network Drives

Determine Who Has A Particular File Open on the Network

Display a Directory Tree

Automate Printer Management

Set the Default Printer Based on Location

Add Printers Based on Name of Computer

Chapter 6 IIS

Hacks #54-61

Back Up the Metabase

Restore the Metabase

Map the Metabase

Metabase Hacks

Hide the Metabase

IIS Administration Scripts

Run Other Web Servers

IISFAQ

Chapter 7 Deployment

Hacks #62-68

Get Started with RIS

Customize RIS

Tune RIS

Customize SysPrep

Remove Windows Components from the Command Line

Unattended Installation of Windows Components

Easily Create a Network Boot Disk

Chapter 8 Security

Hacks #69-78

Fundamentals of a Virus-Free Network

Antivirus FAQ

Rename the Administrator and Guest Accounts

Get a List of Local Administrators

Find All Computers that Are Running a Service

Grant Administrative Access to a Domain Controller

Secure Backups

Find Computers with Automatic logon Enabled

Security FAQ

Microsoft Security Tools

Chapter 9 Patch Management

Hacks #79-89

Best Practices for Patch Management

Beginners Guide to Enterprise Patch Management

Patch-Management FAQ

Enumerate Installed Hotfixes

Apply Patches in the Correct Order

Windows Update FAQ

Obtain Updates via the Windows Update Catalog

Use Automatic Updates Effectively

Use Group Policy to Configure Automatic Updates

Automatic Updates FAQ

Software Update Services FAQ

Chapter 10 Backup and Recovery

Hacks #90-100

Collect Disaster Recovery Files

Back Up Individual Files from the Command Line

Back Up System State on Remote Machines

Back Up and Restore a Certificate Authority

Back Up EFS

Work with Shadow Copies

Back Up and Clear the Event Logs

Back Up the DFS Namespace

Recover with Automated System Recovery

Recovery Roadmap

Data Recovery of Last Resort

Colophon

Mitch Tulloch

Mitch Tulloch is a trainer, consultant, and author living in Winnipeg, Canada. In addition to his Nutshell books for O'Reilly listed below, Mitch is also the author of the Microsoft Encyclopedia of Networking and Microsoft Encyclopedia of Security, both from Microsoft Press, and a string of best-selling books on IIS from Osborne/McGraw-Hill. If you're interested you can find out more about Mitch on his website www.mtit.com. In addition to his O'Reilly weblog, Mitch also maintains a "techblog" at mitchtulloch.blogspot.com containing random thoughts, ideas, suggestions, tips, and resources for network and system administrators.

Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The tool on the cover of Windows Server Hacks is a squeegee, which dates back to the Middle Ages, when fishermen used a wooden ancestor of this tool called a squilgee to scrape fish entrails off the decks of their boats. In Moby Dick , author Herman Melville writes of the whaler's tool known as a nipper, describing them as "leathern" squilgees cut from the tail of a whale. In Melville's story, not only does this precursor to the squeegee clean whale oil from the deck, but "by nameless blandishments, as of magic, allures along with it all impurities."The modern squeegee was born at the turn of the 20th century, when window washers began using a "Chicago squeegee." This heavy steel contraption used two rubber blades, held into place by 12 screws. While easier to use than implements made of wood and whale tails, it was far from perfect. One window cleaner, Ettore Steccone, set out to improve the squeegee, and in 1936 he patented a device called the New Deal. This squeegee, now called the Ettore, is still in wide use by professional window cleaners today. Though Steccone eventually lost his patent, the light weight and distinctive single slit-cut rubber blade of his tool served as a blueprint for all squeegees that followed. Philip Dangler was the production editor and proofreader for Windows Server Hacks . Brian Sawyer was the copyeditor. Marlowe Shaeffer, Mary Brady, and Darren Kelly provided quality control. Johnna VanHoose Dinse wrote the index.Hanna Dyer designed the cover of this book, based on a series design by Edie Freedman. The cover image of a squeegee is an original photgraph by Hanna Dyer. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond and Helvetica Neue fonts.David Futato designed the interior layout. Andrew Savikas converted this book to FrameMaker 5.5.6 with a format conversion tool created by Erik Ray, Jason McIntosh, Neil Walls, and Mike Sierra that uses Perl and XML technologies. The text font is Linotype Birka; the heading font is Adobe Helvetica Neue Condensed; and the code font is LucasFont's TheSans Mono Condensed. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia FreeHand 9 and Adobe Photoshop 6. This colophon was written by Philip Dangler.