Windows Administration at the Command Line




INTRODUCTION



This book offers something for everyone. Everyone needs to locate files on their hard drive. If you
think the GUI is going to help you, think again. After a few frustrating searches, you'll wish for a better
tool and you already have it in the form of the


Dir

command. Unlike the Windows GUI, the

Dir

com-
mand actually locates the files you request on the hard drive. The interesting thing is that the

Dir

command is very easy to use. Anyone can employ this command with very little training.
In fact, I included Chapter 1 of this book for those who have little or no experience with the com-
mand line. Chapter 1 helps you discover techniques for using the command line effectively and con-
figuring it to meet your specific needs. Even if you're a complete command line novice, you can use
this book to get started by reading Chapter 1 first and becoming familiar with the command line.


Goals for Writing This Book

My initial goal for writing this book was to overcome the frustration of using the command line. I con-
stantly had to look up commands on the Internet because I couldn't find a single resource that answered
all of my command line questions. After performing some research online, I found that many other
developers, administrators, and even average users were just as frustrated as I was. Consequently, writ-
ing a book about the command line seemed like an ideal way to help everyone. This book is the result.
Never again will you spend hours looking for the right answer to a command line question; you'll find
them here.

Of course, documenting the command or utility usually isn't enough. It's important to know all
of the caveats of using the command or utility and answer questions such as how much damage it
could cause to a system. In many cases, you also need additional common information, such as a
cultural identifier. Consequently, as I wrote the book, I tried to provide as many tidbits of addi-
tional information as I could. These tidbits turn the documentation entries from functional into
truly useful.

You'll also find a wealth of Real World Scenarios in this book. Each of the Real World Scenarios
tells you about the commands or utilities in general from a real world perspective. All of the stories
in these sections are real. Some of them did happen to me; many others didn't. I did change the
names of those involved to protect the innocent. The point of all these Real World Scenarios is to
provide you something that simple documentation can't: a perspective of why you should care
about a command or utility and how you can use it safely.

Along with all of the other documentation, I wanted to share a few of my favorite techniques for
working at the command line. You'll find scripts that I have used for many years in this book to per-
form work at the command line. The batch files and scripts have seen real world use and you can
use them too. Copy the scripts or batch files out of the book and use them as is, or modify them to
meet your specific needs.


Who Should Read This Book?

Anyone can read this book. In fact, the first five chapters of the book are useful for anyone who uses
Windows regardless of experience level. The amazing array of commands that Windows hides at
the command prompt will give you the tools you require to get more work done with a lot less
effort. Gone are the frustrations of using graphical tools that simply don't work most of the time.

I did anticipate a certain level of knowledge for even the novice command line user. You should
have a good idea of how to work with Windows. For example, you might want to think twice about
using the commands in this book if you don't know how to perform a search of the hard drive using
Windows. In addition, you should be familiar with the mouse and relatively well acquainted with
the keyboard. This book doesn't teach Windows basics--it goes right to the command line and