Available:*
Shelf Number | Material Type | Copy | Shelf Location | Status |
---|---|---|---|---|
005.446 22 | 1:E-BOOK | 1 | 1:ONLINE | Searching... Unknown |
Bound With These Titles
On Order
Summary
Summary
How to Cheat at Windows Systems Administrators using Command Line Scripts teaches system administrators hundreds of powerful, time-saving tips for automating daily system administration tasks using Windows command line scripts.
With every new version of Windows, Microsoft is trying to ease the administration jobs by adding more and more layers of graphical user interface (GUI) or configuration wizards (dialog boxes). While these 'wizards' are interactive and make the administrator's job easier, they are not always the most convenient and efficient way to accomplish the everyday administration tasks. These wizards are time consuming and, at times, may seem a bit confusing. The purpose of the book is to teach administrators how to use command-line scripts to complete everyday administration jobs, solve recurring network problems and at the same time improve their efficiency.
Table of Contents
Introduction | p. xv |
Part I Getting Started with Command Line | p. 1 |
Chapter 1 Basics of the Command Line | p. 3 |
Introduction | p. 4 |
Basics of the Windows Command Shell | p. 4 |
The MS-DOS Command Shell | p. 5 |
Starting the Windows Command Shell | p. 5 |
Customizing the Command Shell Startup | p. 6 |
Customizing the Command Shell Window | p. 9 |
Internal Commands for the Command Shell | p. 13 |
Getting Help for Commands | p. 17 |
Command History | p. 17 |
Displaying Previous Commands with Arrow Keys | p. 18 |
Viewing the Command History in a Pop-Up Window | p. 18 |
Using Function Keys | p. 18 |
Accessing the Windows Command Reference | p. 19 |
Installing Windows Support Tools | p. 20 |
Summary | p. 23 |
Chapter 2 Using Batch Files | p. 25 |
Introduction | p. 26 |
Working Safely with the Command Line | p. 26 |
Configuring the Command Path | p. 28 |
Using the Path Command | p. 29 |
Using the Set and Setx Commands | p. 30 |
Changing Environment Variables in System Properties | p. 31 |
Using Command Redirection | p. 33 |
Command Redirection Operators | p. 33 |
Input Redirection | p. 34 |
Output Redirection | p. 34 |
Redirecting Output to Other Commands | p. 35 |
Error Handling with Redirection Operators | p. 36 |
Using Groups of Commands | p. 37 |
Using & for Sequential Processing | p. 37 |
Using && and | | for Conditional Processing | p. 37 |
Grouping Sets of Commands with Parentheses | p. 38 |
Creating Batch Files | p. 38 |
Batch File Commands | p. 39 |
Batch File Parameters | p. 53 |
Summary | p. 55 |
Chapter 3 Managing Scheduled Tasks | p. 57 |
Introduction | p. 58 |
Scheduling Tasks | p. 58 |
The Task Scheduler | p. 58 |
The Task Scheduler Service | p. 59 |
Accessing the Task Scheduler Service | p. 60 |
Configuring the Properties of the Task Scheduler Service | p. 62 |
Managing Tasks Using the Task Scheduler | p. 64 |
Managing the Properties of Scheduled Tasks | p. 65 |
Monitoring Tasks in the Scheduled Tasks Window | p. 68 |
Creating New Tasks | p. 69 |
Deleting a Scheduled Task | p. 73 |
Running a Scheduled Task Immediately | p. 73 |
Enabling or Disabling a Scheduled Task | p. 74 |
Ending a Running Task | p. 74 |
Event-Based Tasks | p. 74 |
The schtasks Command-Line Utility | p. 75 |
Creating and Running Tasks Using schtasks /Create | p. 76 |
Managing Tasks with schtasks | p. 86 |
Using schtasks /Query to Query a Scheduled Task | p. 86 |
Modifying a Scheduled Task with schtasks /Change | p. 89 |
Running a Scheduled Task with schtasks /Run | p. 91 |
Ending Running Tasks with schtasks /End | p. 92 |
Deleting Scheduled Tasks with schtasks /Delete | p. 93 |
Summary | p. 94 |
Part II Basic Windows Administration | p. 95 |
Chapter 4 Managing Files and Directories | p. 97 |
Introduction | p. 98 |
Using Wildcards in Commands | p. 98 |
File and Folder Attributes | p. 99 |
Viewing Attributes | p. 100 |
Changing Attributes | p. 101 |
Basic File and Folder Operations | p. 101 |
Copying Files with the Copy Command | p. 102 |
Copying Files and Directories with the Xcopy Command | p. 106 |
Renaming Files with the Rename (Ren) Command | p. 113 |
Moving Files Using the Move Command | p. 113 |
Deleting Files with the Del (Erase) Command | p. 115 |
Comparing Files with the Comp Command | p. 116 |
Comparing Files with the FC Command | p. 118 |
Sorting Files with the Sort Command | p. 121 |
Recovering Files with the Recover Command | p. 123 |
Decompressing Files with the Expand Command | p. 123 |
Duplicating and Comparing Disks | p. 125 |
Duplicating Disks with the Diskcopy Command | p. 125 |
Comparing Two Disks with the Diskcomp Command | p. 127 |
Directory-Specific Commands | p. 129 |
Displaying the Directory Structure (Tree) | p. 129 |
Creating a New Directory with MD or Mkdir | p. 130 |
Removing a Directory with RD or Rmdir | p. 131 |
Removing a Directory Tree with the Deltree Command | p. 133 |
Summary | p. 134 |
Chapter 5 Maintaining Hard Disks | p. 135 |
Introduction | p. 136 |
Physical and Logical Disks | p. 136 |
Physical Disks | p. 136 |
Logical Disks | p. 136 |
Understanding Basic and Dynamic Disks | p. 136 |
Basic Disks | p. 137 |
Dynamic Disks | p. 138 |
Tasks Common to Basic and Dynamic Disks | p. 140 |
Supported File Systems | p. 140 |
Formatting a Disk or Partition with the Format Command | p. 141 |
Converting File Systems | p. 145 |
Converting a File System with the Convert Command | p. 147 |
Examining Volume Serial Numbers with the Vol Command | p. 148 |
Managing Volume Labels with the Label Command | p. 149 |
Maintaining Disks and File Systems | p. 150 |
Using the Fsutil Utility for Advanced Disk Management | p. 151 |
Checking Available Disk Space with the Freedisk Command | p. 156 |
Saving Disk Space with the Compact Command | p. 157 |
Managing Mounted Volumes with the Mountvol Command | p. 160 |
Checking and Fixing Bad Sectors with the Chkdsk Command | p. 161 |
Defragmenting Disks with the Defrag Command | p. 165 |
Checking Autocheck Status with the Chkntfs Command | p. 168 |
Summary | p. 170 |
Chapter 6 Managing Hard Disks with the Diskpart Utility | p. 171 |
Introduction | p. 172 |
The Diskpart Utility | p. 172 |
The Object in Focus | p. 172 |
Diskpart Commands | p. 174 |
Scripting with Diskpart | p. 191 |
Diskpart Error Codes | p. 192 |
Obtaining Volume Information | p. 194 |
Understanding Volume Status | p. 195 |
Managing Dynamic Volumes | p. 197 |
Simple Volumes | p. 197 |
Striped Volumes | p. 198 |
Managing Fault-Tolerant Volumes | p. 198 |
Mirrored Volumes | p. 199 |
RAID 5 Volumes | p. 200 |
Summary | p. 201 |
Part III Managing Windows Systems and Printers | p. 203 |
Chapter 7 System Services, Drivers, and the Registry | p. 205 |
Introduction | p. 206 |
Obtaining System Information | p. 206 |
Determining the Operating System Version | p. 206 |
Locating Files with the Where Command | p. 207 |
Checking the System Date and Time | p. 209 |
Obtaining Information on the Logged-On User | p. 211 |
Obtaining System Configuration Information | p. 213 |
Checking Protected System Files with the SFC Command | p. 214 |
Shutting Down and Restarting the System | p. 216 |
Specifying Reasons for the Event Tracker | p. 217 |
Using the Shutdown Command on the Local Computer | p. 218 |
Using the Shutdown Command on the Remote Computer | p. 218 |
Differences between the Windows XP and Windows Server 2003 Shutdown Commands | p. 220 |
Managing System Services | p. 221 |
Obtaining Information about Services | p. 222 |
Starting, Stopping, Pausing, and Resuming Services | p. 225 |
Configuring a Service's Startup Type | p. 225 |
Managing Service Failures | p. 226 |
Configuring the Service Logon Type | p. 228 |
SC Subcommands That Affect All Services | p. 229 |
Obtaining Driver Information | p. 230 |
Managing the Windows Registry | p. 232 |
Data Types Supported in the Windows Registry | p. 234 |
Examining Values Stored in a Subkey | p. 235 |
Comparing Subkeys | p. 236 |
Adding and Deleting Subkeys | p. 237 |
Saving and Restoring Registry Keys | p. 238 |
Copying Registry Keys | p. 239 |
Summary | p. 240 |
Chapter 8 Monitoring System Events, Processes, and Performance | p. 241 |
Introduction | p. 242 |
Managing Event Logs from the Command Line | p. 242 |
Creating New Events | p. 243 |
Working with Event Triggers | p. 244 |
Viewing Logged Events | p. 249 |
Using Filters to View Specific Events | p. 251 |
Monitoring Application Processes and Tasks | p. 254 |
Viewing Running Processes and Applications | p. 254 |
Terminating Applications and Processes | p. 261 |
Using Filters with the TaskList and TaskKill Commands | p. 263 |
Working with System Performance | p. 265 |
Viewing Performance Data | p. 265 |
Adding New Performance Counters | p. 269 |
Removing Performance Counters | p. 270 |
Extracting Performance Counters from Existing Logs | p. 270 |
Summary | p. 272 |
Chapter 9 Managing Printing Services | p. 273 |
Introduction | p. 274 |
Working with Printer Commands | p. 274 |
Working with Remote Computers | p. 275 |
Installing a Local Printer | p. 275 |
Listing All Printers Installed on a Computer | p. 276 |
Adding a Local Printer | p. 277 |
Deleting an Installed Printer | p. 278 |
Displaying All Printers Configured on a Computer | p. 279 |
Displaying the Default Printer | p. 279 |
Setting the Default Printer | p. 280 |
Configuring and Renaming Printers | p. 280 |
Displaying the Printer Configuration | p. 281 |
Configuring Printer Properties | p. 282 |
Renaming a Printer | p. 289 |
Managing Printer Drivers | p. 290 |
Displaying Driver Information for All Printers on a Computer | p. 290 |
Installing a Printer Driver | p. 292 |
Deleting a Printer Driver | p. 293 |
Deleting All Printer Drivers from a Computer | p. 294 |
Creating and Configuring TCP/IP Printer Ports | p. 294 |
Viewing TCP/IP Printing Ports Configured on a Computer | p. 294 |
Creating and Configuring a Standard TCP/IP Printing Port | p. 296 |
Deleting a Standard TCP/IP Printing Port | p. 298 |
Managing Print Queues and Print Jobs | p. 298 |
Printing a Test Page | p. 299 |
Pausing and Resuming a Printer | p. 299 |
Canceling All Print Jobs in the Print Spooler | p. 300 |
Listing All the Print Jobs in a Print Queue | p. 300 |
Pausing, Resuming, and Canceling a Print Job | p. 301 |
Summary | p. 303 |
Part IV Working with Active Directory | p. 305 |
Chapter 10 Overview of Directory Services Commands | p. 307 |
Introduction | p. 308 |
Getting Started with DS Commands | p. 308 |
Types of Objects for DS Commands | p. 309 |
Working on Remote Computers | p. 310 |
Querying the Directory Database with DSQuery | p. 311 |
Parameters Common to All DSQuery Commands | p. 312 |
DSQuery Computer | p. 313 |
DSQuery Contact | p. 314 |
DSQuery Group | p. 314 |
DSQuery OU | p. 314 |
DSQuery Site | p. 315 |
DSQuery Server | p. 315 |
DSQuery User | p. 316 |
DSQuery Quota | p. 318 |
DSQuery Partition | p. 319 |
DSQuery * | p. 319 |
Adding New Objects with DSAdd | p. 321 |
Parameters Common to All DSAdd Commands | p. 321 |
DSAdd Computer | p. 322 |
DSAdd Contact | p. 323 |
DSAdd Group | p. 324 |
DSAdd OU | p. 325 |
DSAdd User | p. 326 |
DSAdd Quota | p. 328 |
Displaying Object Properties with DSGet | p. 329 |
Parameters Common to All DSGet Commands | p. 329 |
DSGet Computer | p. 331 |
DSGet Contact | p. 332 |
DSGet Group | p. 332 |
DSGet OU | p. 333 |
DSGet Server | p. 333 |
DSGet User | p. 334 |
DSGet Subnet | p. 335 |
DSGet Site | p. 335 |
DSGet Quota | p. 336 |
DSGet Partition | p. 336 |
Modifying Objects with DSMod | p. 337 |
DSMod Computer | p. 338 |
DSMod Contact | p. 338 |
DSMod Group | p. 339 |
DSMod OU | p. 339 |
DSMod Server | p. 340 |
DSMod User | p. 340 |
DSMod Quota | p. 340 |
DSMod Partition | p. 341 |
Moving and Renaming Objects with DSMove | p. 341 |
Deleting Directory Objects with DSRm | p. 342 |
Summary | p. 344 |
Chapter 11 Managing Active Directory Users, Groups, and Computers | p. 345 |
Introduction | p. 346 |
Managing User Accounts | p. 346 |
Searching for Users in Active Directory | p. 348 |
Searching for Disabled User Accounts | p. 350 |
Determining Group Memberships of Users | p. 351 |
Creating New User Accounts | p. 352 |
Setting and Modifying User Account Properties | p. 353 |
Moving and Renaming User Accounts | p. 354 |
Resetting User Passwords | p. 356 |
Enabling and Disabling User Accounts | p. 357 |
Deleting User Accounts | p. 358 |
Managing Group Accounts | p. 359 |
Searching for Group Accounts in Active Directory | p. 360 |
Creating New Group Accounts | p. 361 |
Managing Membership of Groups | p. 361 |
Modifying Group Account Properties | p. 362 |
Moving and Renaming Group Accounts | p. 364 |
Deleting Group Accounts | p. 365 |
Managing Computer Accounts | p. 365 |
Searching for Computer Accounts in Active Directory | p. 365 |
Creating New Computer Accounts | p. 366 |
Managing Properties of Computer Accounts | p. 367 |
Resetting Computer Accounts | p. 367 |
Moving and Renaming Computer Accounts | p. 368 |
Enabling and Disabling Computer Accounts | p. 369 |
Deleting Computer Accounts | p. 370 |
Managing Domain Controller Accounts | p. 370 |
Searching for Domain Controllers in Active Directory | p. 370 |
Searching for Domain Controllers with an Operations Master Roles | p. 371 |
Searching for GC Servers | p. 372 |
Managing Roles of GC Servers | p. 373 |
Summary | p. 374 |
Part V Windows Networking | p. 375 |
Chapter 12 Basic TCP/IP Networking Commands | p. 377 |
Introduction | p. 378 |
Overview of the Net Commands | p. 378 |
Starting and Stopping TCP/IP Services | p. 380 |
Troubleshooting Commands for TCP/IP | p. 385 |
Arp | p. 385 |
IPConfig | p. 386 |
Finger | p. 389 |
Getmac | p. 390 |
Hostname | p. 391 |
Netstat | p. 392 |
NBTStat | p. 396 |
NSLookup | p. 398 |
Pathping | p. 400 |
Ping | p. 402 |
Commands for Remote Computers | p. 404 |
FTP | p. 404 |
TFTP | p. 406 |
RCP | p. 407 |
RSH and REXEC | p. 408 |
LPR | p. 409 |
LPQ | p. 409 |
Summary | p. 410 |
Chapter 13 Administering Network Services | p. 411 |
Introduction | p. 412 |
Overview of the NETSH Commands | p. 412 |
Commands Available within the NETSH Prompt | p. 412 |
List of Subcommands Available within the NETSH Prompt | p. 413 |
NETSH Commands for Troubleshooting | p. 417 |
Using Ping to Verify Connectivity | p. 418 |
Managing Interfaces with NETSH | p. 422 |
Managing IP Addressing | p. 422 |
Managing the DNS Settings of an Interface | p. 428 |
Managing Interface IP WINS Settings | p. 430 |
Managing Automatic Addressing Using DHCP Services | p. 434 |
NETSH DHCP | p. 434 |
NETSH DHCP Server | p. 437 |
NETSH DHCP Server Scope | p. 438 |
NETSH Commands for AAAA | p. 439 |
Summary | p. 442 |
Appendix A MS-DOS Commands Not Supported in Windows XP and Windows 2003 | p. 443 |
Introduction | p. 443 |
MS-DOS Commands Not Supported in Windows XP/2003 32-Bit Operating Systems | p. 443 |
assign | p. 443 |
backup | p. 444 |
choice | p. 445 |
ctty | p. 445 |
deltree | p. 446 |
emm386 | p. 446 |
fdisk | p. 447 |
mscdex | p. 447 |
scandisk | p. 448 |
Smartdrv | p. 448 |
sys | p. 449 |
MS-DOS Commands Not Supported in Windows XP/2003 64-Bit Operating Systems | p. 450 |
debug | p. 450 |
edit | p. 450 |
edlin | p. 451 |
exe2bin | p. 451 |
expand | p. 451 |
fasthelp | p. 452 |
fastopen | p. 452 |
forcedos | p. 453 |
graphics | p. 453 |
loadfix | p. 454 |
loadhigh | p. 454 |
mem | p. 455 |
nlsfunc | p. 455 |
setver | p. 456 |
share | p. 456 |
Index | p. 457 |