Windows Command-Line:
The Personal Trainer
Windows 8.1, Windows Server 2012 &
Windows Server 2012 R2
William Stanek
PUBLISHED BY
Stanek & Associates
PO Box 362
East Olympia, WA 98540-0362
Copyright 2015 William Stanek
All rights reserved. No part of the contents of this book may be reproduced, stored or transmitted in any form or by any means without the express written permission of the publisher.
United States of America
The Personal Trainer and Stanek & Associates are trademarks of William Stanek. All other marks are property of their respective owners.
The example names for companies, organizations, persons and other named elements used in the book are fictitious. No association with any real company, organization, person or other named element is intended or should be inferred.
This book expresses the authors views and opinions. The information contained herein is provided without any express, statutory or implied warranties. Neither the authors, the publishers, the resellers nor distributors will be held liable for any damages caused or alleged to be caused either directly or indirectly by this book.
Cover Design: Creative Designs Ltd.
Editorial Development: Andover Publishing Solutions
Technical Review: L & L Technical Content Services
You can provide feedback related to this book by emailing the author at williamstanek@aol.com. Please use the name of the book as the subject line.
Contents at a Glance
Table of Contents
Introduction
Windows Command Line: The Personal Trainer is the authoritative quick reference guide to Windows Command Line and is designed to be a key resource you turn to whenever you have questions about Windows Command Line. To this end, the book zeroes in on the key aspects of Windows Command Line that you'll use the most.
Inside this books pages, you'll find comprehensive overviews, step-by-step procedures, frequently used tasks, documented examples, and much more. One of the goals is to keep the content so concise that the book remains compact and easy to navigate while at the same time ensuring that the book is packed with as much information as possiblemaking it a valuable resource.
Whats This Book About?
In this book, I teach you how Windows Command Line features work, why they work the way they do, and how to use them to meet your needs. One of the goals is to keep the content so concise that the book remains compact and easy to navigate while ensuring that the book is packed with as much information as possiblemaking it a valuable resource. In addition, this book provides hands-on, tips, and best practices for working with Windows Command Line.
What Do I Need to Know?
To get practical and useful information into your hands without the clutter of a ton of background material, I had to assume several things. If you are reading this book, I hope that you have basic networking skills and a basic understanding of Windows. With this in mind, I dont devote entire chapters to understanding Windows architecture, installing Windows, or Windows startup and shutdown. I also assume that you are fairly familiar with Windows commands and procedures as well as the Windows user interface. If you need help learning Windows basics, you should read the Windows documentation.
How Is This Book Organized?
Rome wasnt built in a day, and this book wasnt intended to be read in a day, a week, or even 21 days. Ideally, youll read this book at your own pace, a little each day, as you work your way through the features Windows Command Line has to offer.
Making this book easy to follow and understand was my number one goal. I really want anyone, skill level or work schedule aside, to be able to learn how to effectively use Windows Command Line.
To make the book easy to use, this book is organized into multiple chapters. The chapters are arranged in a logical order, taking you from the essential concepts you need to know to work with Windows Command Line to techniques for managing computers with scripts.
Windows Command Line: The Personal Trainer is designed to be used with Windows Command Line for Administration: The Personal Trainer . While this book focuses on core features, the latter book focuses using Windows Command Line to manage computers, networks, printers and Active Directory.
What Conventions Are Used in This Book?
Ive used a variety of elements to help keep the text clear and easy to follow. Youll find code terms and listings in monospace type, except when I tell you to actually enter a command. In that case, the command appears in bold type. When I introduce and define a new term, I put it in italics .
This book also has notes, tips and other sidebar elements that provide additional details on points that need emphasis.
Other Resources
Although some books are offered as all-in-one guides, there's simply no way one book can do it all. This book is intended to be used as a concise and easy-to-use resource. It covers everything you need to perform core tasks with Windows Command Line, but it is by no means exhaustive.
As you encounter new topics, take the time to practice what you've learned and read about. Seek additional information as necessary to get the practical experience and knowledge that you need.
I truly hope you find that Windows Command Line: The Personal Trainer helps you use Windows Command Line successfully and effectively.
Thank you,
William R. Stanek
()
Chapter 1. Overview of the Windows Command Line
The command line is built into the Microsoft Windows operating system and is accessed through the command-shell window. Every version of Windows has had a built-in command line, used to run built-in commands, utilities, and scripts. Although the command line is powerful and versatile, some never use it. If you are happy using the graphical tools, you may be able to use them forever without ever having to do anything more than point and click.
However, for proficient Windows users, skilled support staff, and IT professionals, the Windows command line is inescapable. Knowing how to use the command line properlyincluding which command-line tools to use when and how to work with the tools effectivelycan mean the difference between smooth-running computers and frequent problems. And if youre responsible for multiple domains or networks, learning the time-saving strategies that the command line offers is not just importantits essential for sustaining day-to-day operations.
In this chapter, Ill explain command line essentials, how to use built-in commands, how to run command-line utilities, and how to work with other support tools. Right up front I should tell you that Windows 8.1, Windows Server 2012, and Windows Server 2012 R2 have many more command-line tools available by default than their predecessors. In fact, many of the tools that were previously available only when you installed the Windows Support Tools and the Windows Server Resource Kit tools are now available by default.
REAL WORLD As you read this chapter, and the rest of the book, keep in mind that this book is written for Windows Server 2012, Windows Server 2012 R2 and Windows 8.1. Techniques that you learn in this book can be used on any of these operating systems unless otherwise noted. In some cases, you might be able to use the techniques discussed with other Windows operating systems, although the options or functions may vary. In any case, you should always test commands, options, and scripts before using them. The best way to do this is in a development or test environment where the systems with which you are working are isolated from the rest of the network.
Next page