| |
| |
Acknowledgments | |
| |
| |
Introduction | |
| |
| |
Who Is This Book For? | |
| |
| |
How Is This Book Organized? | |
| |
| |
Conventions Used in This Book | |
| |
| |
Support | |
| |
| |
| |
Windows Command-Line Fundamentals | |
| |
| |
| |
Overview of the Windows Command Line | |
| |
| |
Command Line Essentials | |
| |
| |
Understanding the Windows Command Shell | |
| |
| |
Understanding the MS-DOS Command Shell | |
| |
| |
Understanding Windows PowerShell | |
| |
| |
Configuring Command-Line Properties | |
| |
| |
Working with the Command History | |
| |
| |
Making Supplemental Components Available | |
| |
| |
Using the Microsoft Remote Server Administration Tools for Windows Vista | |
| |
| |
Registering the Remote Server Administration Tools Package | |
| |
| |
Configuring and Selecting Remote Server Administration Tools | |
| |
| |
Removing the Remote Server Administration Tools | |
| |
| |
Removing the Remote Server Administration Tools Package | |
| |
| |
| |
Getting the Most from the Command Line | |
| |
| |
Managing Command Shell Startup | |
| |
| |
Working with the Command Path | |
| |
| |
Managing the Command Path | |
| |
| |
Managing File Extensions and File Associations | |
| |
| |
Redirecting Standard Input, Output, and Error | |
| |
| |
Redirecting Standard Output to Other Commands | |
| |
| |
Redirecting I/O to and from Files | |
| |
| |
Redirecting Standard Error | |
| |
| |
Chaining and Grouping Commands | |
| |
| |
Using Chains of Commands | |
| |
| |
Grouping Command Sequences | |
| |
| |
| |
Command-Line Scripting Essentials | |
| |
| |
Creating Command-Line Scripts | |
| |
| |
Common Statements and Commands for Scripts | |
| |
| |
Clearing the Command-Shell Window | |
| |
| |
Adding Comments to Scripts | |
| |
| |
Managing Text Display and Command Echoing | |
| |
| |
Fine-Tuning Command Echo with @ | |
| |
| |
Setting the Console Window Title and Colors | |
| |
| |
Passing Arguments to Scripts | |
| |
| |
Getting Acquainted with Variables | |
| |
| |
Using Variables in Scripts | |
| |
| |
Naming Variables | |
| |
| |
Setting Variable Values | |
| |
| |
Substituting Variable Values | |
| |
| |
Localizing Variable Scope | |
| |
| |
Using Mathematical Expressions | |
| |
| |
Working with Arithmetic and Assignment Operators | |
| |
| |
Understanding Operator Precedence | |
| |
| |
Simulating Exponents | |
| |
| |
Command-Line Selection Statements | |
| |
| |
Using If | |
| |
| |
Using If Not | |
| |
| |
Using If Defined and If Not Defined | |
| |
| |
Nesting Ifs | |
| |
| |
Making Comparisons in If Statements | |
| |
| |
Command Line Iteration Statements | |
| |
| |
Iteration Essentials | |
| |
| |
Stepping Through a Series of Values | |
| |
| |
Iterating Through Groups of Files | |
| |
| |
Iterating Through Directories | |
| |
| |
Parsing File Content and Output | |
| |
| |
Creating Subroutines and Procedures | |
| |
| |
Using Subroutines | |
| |
| |
Using Procedures | |
| |
| |
| |
Windows Systems Administration Using the Command Line | |
| |
| |
| |
Deploying Windows Servers | |
| |
| |
Managing Server Configurations | |
| |
| |
Working with Roles, Role Services, and Features | |
| |
| |
Managing Roles, Role Services, and Features | |
| |
| |
ServerManagerCmd Essentials | |
| |
| |
Querying Installed Roles, Role Services, and Features | |
| |
| |
Installing Roles, Role Services, and Features | |
| |
| |
Removing Roles, Role Services, and Features | |
| |
| |
| |
Managing Windows Systems | |
| |
| |
Examining System Information | |
| |
| |
Working with the Registry | |
| |
| |
Understanding Registry Keys and Values | |
| |
| |
Querying Registry Values | |
| |
| |
Comparing Registry Keys | |
| |
| |
Saving and Restoring Registry Keys | |
| |
| |
Adding Registry keys | |
| |
| |
Copying Registry Keys | |
| |
| |
Deleting Registry Keys | |
| |
| |
Exporting and Importing Registry Keys | |
| |
| |
Loading and Unloading Registry Keys | |
| |
| |
Managing System Services | |
| |
| |
Viewing Configured Services | |
| |
| |
Starting, Stopping, and Pausing Services | |
| |
| |
Configuring Service Startup | |
| |
| |
Configuring Service Logon | |
| |
| |
Configuring Service Recovery | |
| |
| |
Restarting and Shutting Down Systems from the Command Line | |
| |
| |
Managing Restart and Shutdown of Local Systems | |
| |
| |
Managing Restart and Shutdown of Remote Systems | |
| |
| |
Adding Shutdown or Restart Reasons and Comments | |
| |
| |
| |
Event Logging, Tracking, and Monitoring | |
| |
| |
Windows Event Logging | |
| |
| |
Viewing and Filtering Event Logs | |
| |
| |
Viewing Events | |
| |
| |
Filtering Events | |
| |
| |
Writing Custom Events to the Event Logs | |
| |
| |
Creating and Using Saved Queries | |
| |
| |
Monitoring Performance: The Essentials | |
| |
| |
Understanding Performance Monitoring at the Command Line | |
| |
| |
Tracking Performance Data | |
| |
| |
| |
Monitoring Processes and Maintaining Performance | |
| |
| |
Managing Applications, Processes, and Performance | |
| |
| |
Understanding System and User Processes | |
| |
| |
Examining Running Processes | |
| |
| |
Monitoring System Resource Usage and Processes | |
| |
| |
Stopping Processes | |
| |
| |
Detecting and Resolving Performance Issues Through Monitoring | |
| |
| |
Monitoring Memory Paging and Paging to Disk | |
| |
| |
Monitoring Memory Usage and the Working Memory Set for Individual Processes | |
| |
| |
Resolving Performance Bottlenecks | |
| |
| |
| |
Managing Event and Performance Logging | |
| |
| |
Managing the Event Logs | |
| |
| |
Getting Started with Wevtutil | |
| |
| |
Listing Available Logs and Registered Publishers | |
| |
| |
Viewing and Changing Log Configuration | |
| |
| |
Exporting and Manipulating Event Logs | |
| |
| |
Clearing Event Logs | |
| |
| |
Centralizing Event Logging Across the Enterprise | |
| |
| |
Configuring Event Forwarding and Collection | |
| |
| |
Creating Subscriptions | |
| |
| |
Managing Subscriptions | |
| |
| |
Performance Logging | |
| |
| |
Getting Started with Data Collector Sets | |
| |
| |
Working with Data Collector Sets | |
| |
| |
Collecting Performance Counter Data | |
| |
| |
Configuring Performance Counter Alerts | |
| |
| |
Viewing Data Collector Reports | |
| |
| |
| |
Scheduling Tasks to Run Automatically | |
| |
| |
Scheduling Tasks on Local and Remote Systems | |
| |
| |
Introducing Task Scheduling | |
| |
| |
Monitoring Scheduled Tasks | |
| |
| |
Scheduling Tasks with Task Scheduler | |
| |
| |
Creating Basic Tasks | |
| |
| |
Creating Advanced Tasks | |
| |
| |
Managing Task Properties | |
| |
| |
Enabling and Disabling Tasks | |
| |
| |
Copying Tasks to Other Computers | |
| |
| |
Running Tasks Immediately | |
| |
| |
Removing Unwanted Tasks | |
| |
| |
Scheduling Tasks with Schtasks | |
| |
| |
Creating Scheduled Tasks with Schtasks /Create | |
| |
| |
Creating Scheduled Tasks Triggered by Windows Events | |
| |
| |
Changing Scheduled Tasks with Schtasks /Change | |
| |
| |
Querying for Configured Tasks with Schtasks /Query | |
| |
| |
Creating Tasks Using XML Configuration Files | |
| |
| |
Running Tasks Immediately with Schtasks /Run | |
| |
| |
Stopping Running Tasks with Schtasks /End | |
| |
| |
Deleting Tasks with Schtasks /Delete | |
| |
| |
| |
Windows File System and Disk Administration Using the Command Line | |
| |
| |
| |
Configuring and Maintaining Disks | |
| |
| |
Getting Started with DiskPart | |
| |
| |
DiskPart Basics | |
| |
| |
DiskPart: An Example | |
| |
| |
Understanding Focus and What It Means | |
| |
| |
DiskPart Commands and Scripts | |
| |
| |
DiskPart: A Script Example | |
| |
| |
Installing and Managing Hard Disk Drives | |
| |
| |
Installing and Checking for a New Drive | |
| |
| |
Checking Drive Status and Configuration | |
| |
| |
Changing Drive Partition Styles | |
| |
| |
Working with Basic and Dynamic Disks | |
| |
| |
Understanding Basic and Dynamic Disks | |
| |
| |
Setting the Active Partition | |
| |
| |
Changing the Disk Type: Basic to Dynamic or Vice Versa | |
| |
| |
Maintaining Disks | |
| |
| |
Obtaining Disk Information and Managing File Systems with FSUtil | |
| |
| |
Checking Disks for Errors and Bad Sectors | |
| |
| |
Fixing Disk Errors | |
| |
| |
Controlling Auto Check on Startup | |
| |
| |
Defragmenting Disks | |
| |
| |
| |
Partitioning Basic Disks | |
| |
| |
Obtaining Partition Information | |
| |
| |
Creating Partitions | |
| |
| |
Creating Partitions for MBR Disks | |
| |
| |
Creating Partitions for GPT Disks | |
| |
| |
Managing Drive Letters and Mount Points | |
| |
| |
Assigning Drive Letters or Mount Points | |
| |
| |
Changing Drive Letters or Mount Points | |
| |
| |
Removing Drive Letters or Mount Points | |
| |
| |
Formatting Partitions | |
| |
| |
Using FORMAT | |
| |
| |
Using FILESYSTEMS | |
| |
| |
Formatting: An Example | |
| |
| |
Managing Partitions | |
| |
| |
Converting a Partition or Volume to NTFS | |
| |
| |
Changing or Deleting the Volume Label | |
| |
| |
Shrinking Partitions or Volumes | |
| |
| |
Extending Partitions or Volumes | |
| |
| |
Deleting Partitions | |
| |
| |
| |
Managing Volumes and RAID on Dynamic Disks | |
| |
| |
Obtaining Volume Information and Status | |
| |
| |
Creating and Managing Simple Volumes | |
| |
| |
Creating Simple Volumes | |
| |
| |
Extending Simple Volumes | |
| |
| |
Bringing Dynamic Disks Online | |
| |
| |
Deleting Volumes | |
| |
| |
Providing Fault Tolerance with RAID on Dynamic Disks | |
| |
| |
Implementing RAID-0: Disk Striping | |
| |
| |
Implementing RAID-1: Disk Mirroring and Duplexing | |
| |
| |
Implementing RAID-5: Disk Striping with Parity | |
| |
| |
Managing RAID and Recovering from Failure | |
| |
| |
Breaking a Mirrored Set | |
| |
| |
Resynchronizing and Repairing a Mirrored Set | |
| |
| |
Repairing a RAID-0 Striped Set Without Parity | |
| |
| |
Regenerating a RAID-5 Striped Set with Parity | |
| |
| |
| |
Windows Active Directory Administration Using the Command Line | |
| |
| |
| |
Core Active Directory Services Administration | |
| |
| |
Controlling Active Directory from the Command Line | |
| |
| |
Understanding Domains, Containers, and Objects | |
| |
| |
Understanding Logical and Physical Structures in Active Directory | |
| |
| |
Understanding Distinguished Names | |
| |
| |
Getting Started with the Active Directory Command-Line Tools | |
| |
| |
Making Directory Queries Using the DSQUERY Command | |
| |
| |
DSQUERY Subcommands and Syntax | |
| |
| |
Searching Using Names, Descriptions, and SAM Account Names | |
| |
| |
Setting Logon and Run As Permissions for Searches | |
| |
| |
Setting the Start Node, Search Scope, and Object Limit | |
| |
| |
Setting the Output Format for Names | |
| |
| |
Using DSQUERY with Other Active Directory Command-Line Tools | |
| |
| |
Searching for Problem User and Computer Accounts | |
| |
| |
Renaming and Moving Objects | |
| |
| |
Removing Objects from Active Directory | |
| |
| |
| |
Managing Computer Accounts and Domain Controllers | |
| |
| |
Overview of Managing Computer Accounts from the Command Line | |
| |
| |
Creating Computer Accounts in Active Directory Domains | |
| |
| |
Creating a Computer Account | |
| |
| |
Customizing Computer Account Attributes and Group Memberships | |
| |
| |
Managing Computer Account Properties | |
| |
| |
Viewing and Finding Computer Accounts | |
| |
| |
Setting or Changing a Computer's Location or Description Attribute | |
| |
| |
Disabling and Enabling Computer Accounts | |
| |
| |
Resetting Locked Computer Accounts | |
| |
| |
Joining Computer Accounts to a Domain | |
| |
| |
Renaming Computers and Computer Accounts | |
| |
| |
Moving Computer Accounts | |
| |
| |
Deleting Computer Accounts | |
| |
| |
Working with Domain Controllers | |
| |
| |
Installing and Demoting Domain Controllers | |
| |
| |
Finding Domain Controllers in Active Directory | |
| |
| |
Designating Global Catalog Servers | |
| |
| |
Finding Global Catalog Servers | |
| |
| |
Adding or Removing a Global Catalog | |
| |
| |
Checking Caching Settings and Global Catalog Preferences | |
| |
| |
Designating Operations Masters | |
| |
| |
Finding Operations Masters | |
| |
| |
Configuring Operations Master Roles Using the Command Line | |
| |
| |
Finding Read-Only Domain Controllers | |
| |
| |
| |
Managing Active Directory Users and Groups | |
| |
| |
Overview of Managing User Accounts from the Command Line | |
| |
| |
Adding User Accounts | |
| |
| |
Creating Domain User Accounts | |
| |
| |
Customizing Domain User Account Attributes and Group Memberships | |
| |
| |
Creating Local User Accounts | |
| |
| |
Managing User Accounts | |
| |
| |
Viewing and Finding User Accounts | |
| |
| |
Determining Group Membership for Individual User Accounts | |
| |
| |
Setting or Changing User Account Attributes | |
| |
| |
Disabling and Enabling User Accounts | |
| |
| |
Resetting Expired User Accounts | |
| |
| |
Controlling and Resetting User Passwords | |
| |
| |
Moving User Accounts | |
| |
| |
Renaming User Accounts | |
| |
| |
Deleting User Accounts | |
| |
| |
Overview of Managing Group Accounts from the Command Line | |
| |
| |
Adding Group Accounts | |
| |
| |
Creating Security and Distribution Groups | |
| |
| |
Creating a Local Group and Assigning Members | |
| |
| |
Managing Group Accounts | |
| |
| |
Viewing and Finding Group Accounts | |
| |
| |
Determining Group membership | |
| |
| |
Changing Group Type or Scope | |
| |
| |
Adding, Removing, or Replacing Group Members | |
| |
| |
Moving Group Accounts | |
| |
| |
Renaming Group Accounts | |
| |
| |
Deleting Group Accounts | |
| |
| |
| |
Windows Network Administration Using the Command Line | |
| |
| |
| |
Administering Network Printers and Print Services | |
| |
| |
Obtaining Support and Troubleshooting Information for Printers | |
| |
| |
Working with Printers at the Command Line | |
| |
| |
Tracking Print Drivers and Printer Information | |
| |
| |
Getting Detailed Print Statistics for Capacity Planning and Troubleshooting | |
| |
| |
Managing Printers | |
| |
| |
Installing Physically Attached Print Devices | |
| |
| |
Installing Network-Attached Print Devices | |
| |
| |
Listing Printers Configured on a Computer | |
| |
| |
Viewing and Setting the Default Printer | |
| |
| |
Renaming Printers | |
| |
| |
Deleting Printers | |
| |
| |
Managing TCP/IP Ports for Network-Attached Printers | |
| |
| |
Creating and Changing TCP/IP Ports for Printers | |
| |
| |
Listing Information About TCP/IP Ports Used by Printers | |
| |
| |
Deleting TCP/IP Ports Used by Printers | |
| |
| |
Configuring Printer Properties | |
| |
| |
Adding Comments and Location Information | |
| |
| |
Sharing Printers | |
| |
| |
Publishing Printers in Active Directory | |
| |
| |
Setting a Separator Page and Changing Print Device Mode | |
| |
| |
Scheduling and Prioritizing Print Jobs | |
| |
| |
Configuring Spooling and Other Advanced Printer Options | |
| |
| |
Solving Spooling Problems | |
| |
| |
Checking the Print Spooler Service | |
| |
| |
Fixing a Corrupted Spooler | |
| |
| |
Managing Print Queues and Individual Print Jobs | |
| |
| |
Viewing Jobs in the Queue | |
| |
| |
Pausing the Printer and Resuming Printing | |
| |
| |
Emptying the Print Queue | |
| |
| |
Pausing, Resuming, and Restarting Individual Document Printing | |
| |
| |
Removing a Document and Canceling a Print Job | |
| |
| |
Backing Up and Restoring Print Server Configurations | |
| |
| |
Backing Up Print Server Configurations | |
| |
| |
Restoring Print Server Configurations | |
| |
| |
Migrating Printers and Print Queues | |
| |
| |
| |
Configuring, Maintaining, and Troubleshooting TCP/IP Networking | |
| |
| |
Using the Network Services Shell | |
| |
| |
Working with Netsh Contexts | |
| |
| |
Working with Remote Computers | |
| |
| |
Working with Script Files | |
| |
| |
Managing TCP/IP Settings | |
| |
| |
Configuring IPv4 | |
| |
| |
Configuring IPv6 | |
| |
| |
Supporting TCP/IP Networking | |
| |
| |
Obtaining and Saving the TCP/IP Configuration | |
| |
| |
Examining IP Address and Interface Configurations | |
| |
| |
Working with TCP Internet Control and Error Messages | |
| |
| |
Examining Fragmentation, Reassembly, and Error Details | |
| |
| |
Examining Current TCP and UDP Connections | |
| |
| |
Troubleshooting TCP/IP Networking | |
| |
| |
Viewing Diagnostic Information | |
| |
| |
Diagnosing General Computer Configuration Issues | |
| |
| |
| |
Essential Command-Line Tools Reference | |
| |
| |
| |
Quick Reference for Netsh | |
| |
| |
Index | |