Windows Command-Line Administrator's Pocket Consultant, Second Edition Ebook

Windows Command-Line Administrator's Pocket Consultant, Second Edition Ebook

PUBLISHED BY Microsoft Press A Division of Microsoft Corporation One Microsoft Way Redmond, Washington 98052-6399 Copyright © 2008 by William R. Stanek All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. Library of Congress Control Number: 2008927283 Printed and bound in the United States of America. 1 2 3 4 5 6 7 8 9 QWE 3 2 1 0 9 8 Distributed in Canada by H.B. Fenn and Company Ltd. A CIP catalogue record for this book is available from the British Library. Microsoft Press books are available through booksellers and distributors worldwide. For further information about international editions, contact your local Microsoft Corporation office or contact Microsoft Press International directly at fax (425) 936-7329. Visit our Web site at www.microsoft.com/mspress. Send comments to [email protected]. Microsoft, Microsoft Press, Access, Active Directory, BitLocker, Hyper-V, Internet Explorer, MS-DOS, SharePoint, SQL Server, Win32, Windows, Windows Media, Windows NT, Windows PowerShell, Windows Server, and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Other product and company names mentioned herein may be the trademarks of their respective owners. The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. This book expresses the author's views and opinions. The information contained in this book is provided without any express, statutory, or implied warranties. Neither the authors, Microsoft Corporation, nor its resellers, or distributors will be held liable for any damages caused or alleged to be caused either directly or indirectly by this book. Acquisitions Editor: Martin DelRe Developmental Editor: Karen Szall Project Editor: Maria Gargiulo Editorial Production: ICC Macmillan, Inc. Technical Reviewer: James Johnson, Technical Review services provided by Content Master, a member of CM Group, Ltd Cover: Tom Draper Design Body Part No. X14-71538 Contents at a Glance Part I Windows Command-Line Fundamentals 1 Overview of the Windows Command Line. 3 2 Getting the Most from the Command Line . 17 3 Command-Line Scripting Essentials . 27 Part II Windows Systems Administration Using the Command Line 4 Deploying Windows Servers . 59 5 Managing Windows Systems . 79 6 Event Logging, Tracking, and Monitoring . 105 7 Monitoring Processes and Maintaining Performance . 125 8 Managing Event and Performance Logging . 153 9 Scheduling Tasks to Run Automatically . 191 Part III Windows File System and Disk Administration Using the Command Line 10 Configuring and Maintaining Disks . 225 11 Partitioning Basic Disks. 257 12 Managing Volumes and RAID on Dynamic Disks . 279 Part IV Windows Active Directory Administration Using the Command Line 13 Core Active Directory Services Administration . 297 14 Managing Computer Accounts and Domain Controllers . 315 15 Managing Active Directory Users and Groups . 339 Part V Windows Network Administration Using the Command Line 16 Administering Network Printers and Print Services . 371 17 Configuring, Maintaining, and Troubleshooting TCP/IP Networking . 405 iii iv Contents at a Glance Appendix A Essential Command-Line Tools Reference . 453 Appendix B Quick Reference for Netsh . 501 Table of Contents Acknowledgments . xvii Introduction . .xix Who Is This Book For? . .xix How Is This Book Organized? . xx Conventions Used in This Book. .xxi Support . xxii Part I Windows Command-Line Fundamentals 1 Overview of the Windows Command Line . 3 Command Line Essentials . 3 Understanding the Windows Command Shell . 4 Understanding the MS-DOS Command Shell . 8 Understanding Windows PowerShell. 9 Configuring Command-Line Properties . 11 Working with the Command History. 12 Making Supplemental Components Available . 13 Using the Microsoft Remote Server Administration Tools for Windows Vista. 14 Registering the Remote Server Administration Tools Package . 14 Configuring and Selecting Remote Server Administration Tools. 15 Removing the Remote Server Administration Tools . 16 Removing the Remote Server Administration Tools Package . 16 2 Getting the Most from the Command Line . 17 Managing Command Shell Startup . 18 Working with the Command Path . 20 Managing the Command Path . 20 Managing File Extensions and File Associations . 21 What do you think of this book? We want to hear from you! Microsoft is interested in hearing your feedback so we can continually improve our books and learning resources for you. To participate in a brief survey, please visit: www.microsoft.com/learning/booksurvey v vi Table of Contents Redirecting Standard Input, Output, and Error . 22 Redirecting Standard Output to Other Commands . 23 Redirecting I/O to and from Files. 24 Redirecting Standard Error . 24 Chaining and Grouping Commands . 25 Using Chains of Commands . 25 Grouping Command Sequences . 26 3 Command-Line Scripting Essentials. 27 Creating Command-Line Scripts. 27 Common Statements and Commands for Scripts . 29 Clearing the Command-Shell Window . 29 Adding Comments to Scripts . 30 Managing Text Display and Command Echoing . 31 Fine-Tuning Command Echo with @ . 32 Setting the Console Window Title and Colors . 33 Passing Arguments to Scripts . 34 Getting Acquainted with Variables. 35 Using Variables in Scripts . 36 Naming Variables . 36 Setting Variable Values . 37 Substituting Variable Values . 38 Localizing Variable Scope . 40 Using Mathematical Expressions. 41 Working with Arithmetic and Assignment Operators. 41 Understanding Operator Precedence . 42 Simulating Exponents . 43 Command-Line Selection Statements . 43 Using If . 43 Using If Not . 44 Using If Defined and If Not Defined . 45 Nesting Ifs . 45 Making Comparisons in If Statements. 45 Command Line Iteration Statements . 46 Iteration Essentials . 47 Stepping Through a Series of Values . 48 Iterating Through Groups of Files . 49 Iterating Through Directories . 49 Parsing File Content and Output . 51 Table of Contents vii Creating Subroutines and Procedures . 54 Using Subroutines. 54 Using Procedures . 56 Part II Windows Systems Administration Using the Command Line 4 Deploying Windows Servers . 59 Managing Server Configurations . 59 Working with Roles, Role Services, and Features . 61 Managing Roles, Role Services, and Features . 68 ServerManagerCmd Essentials . 68 Querying Installed Roles, Role Services, and Features . 74 Installing Roles, Role Services, and Features . 75 Removing Roles, Role Services, and Features . 77 5 Managing Windows Systems . 79 Examining System Information . 79 Working with the Registry . 81 Understanding Registry Keys and Values . 82 Querying Registry Values. 84 Comparing Registry Keys. 85 Saving and Restoring Registry Keys . ..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    99 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us