How to Cheat at Windows System Administration Using Command Line Scripts -  Pawan K Bhardwaj

How to Cheat at Windows System Administration Using Command Line Scripts (eBook)

eBook Download: PDF
2006 | 1. Auflage
400 Seiten
Elsevier Science (Verlag)
978-0-08-050826-9 (ISBN)
Systemvoraussetzungen
33,37 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen
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.

*Provides system administrators with hundreds of tips, tricks, and scripts to complete administration tasks more quickly and efficiently.

*No direct competition for a core tool for Windows administrators.

*Builds on success of other books in the series including How to Cheat at Managing Windows Small Business Server 2003 and How to Cheat at Managing Microsoft Operations Manager 2005.
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. - Provides system administrators with hundreds of tips, tricks, and scripts to complete administration tasks more quickly and efficiently. - No direct competition for a core tool for Windows administrators. - Builds on success of other books in the series including How to Cheat at Managing Windows Small Business Server 2003 and How to Cheat at Managing Microsoft Operations Manager 2005.

Front Cover 1
How to Cheat at Windows System Administration: Using Command Line Scripts 2
Copyright Page 3
Contents 8
Introduction 16
Part I: Getting Started with Command Line 20
Chapter 1. Basics of the Command Line 22
Introduction 23
Basics of the Windows Command Shell 23
Starting the Windows Command Shell 24
Internal Commands for the Command Shell 32
Command History 36
Accessing the Windows Command Reference 38
Installing Windows Support Tools 39
Summary 42
Chapter 2. Using Batch Files 44
Introduction 45
Working Safely with the Command Line 45
Configuring the Command Path 47
Using Command Redirection 52
Using Groups of Commands 56
Creating Batch Files 57
Summary 74
Chapter 3. Managing Scheduled Tasks 76
Introduction 77
Scheduling Tasks 77
The Task Scheduler Service 78
Managing Tasks Using the Task Scheduler 83
The schtasks Command-Line Utility 94
Managing Tasks with schtasks 105
Summary 113
Part II: Basic Windows Administration 114
Chapter 4. Managing Files and Directories 116
Introduction 117
Using Wildcards in Commands 117
File and Folder Attributes 118
Basic File and Folder Operations 120
Duplicating and Comparing Disks 144
Directory-Specific Commands 148
Summary 153
Chapter 5. Maintaining Hard Disks 154
Introduction 155
Physical and Logical Disks 155
Understanding Basic and Dynamic Disks 155
Supported File Systems 159
Converting File Systems 164
Summary 189
Chapter 6. Managing Hard Disks with the Diskpart Utility 190
Introduction 191
The Diskpart Utility 191
Diskpart Commands 193
Scripting with Diskpart 210
Obtaining Volume Information 213
Managing Dynamic Volumes 216
Managing Fault-Tolerant Volumes 217
Summary 220
Part III: Managing Windows Systems and Printers 222
Chapter 7. System Services, Drivers, and the Registry 224
Introduction 225
Obtaining System Information 225
Shutting Down and Restarting the System 235
Managing System Services 240
Obtaining Driver Information 249
Managing the Windows Registry 251
Summary 259
Chapter 8. Monitoring System Events, Processes, and Performance 260
Introduction 261
Managing Event Logs from the Command Line 261
Creating New Events 262
Working with Event Triggers 263
Viewing Logged Events 268
Monitoring Application Processes and Tasks 273
Using Filters with the TaskList and TaskKill Commands 282
Working with System Performance 284
Extracting Performance Counters from Existing Logs 289
Summary 291
Chapter 9. Managing Printing Services 292
Introduction 293
Working with Printer Commands 293
Installing a Local Printer 294
Configuring and Renaming Printers 299
Managing Printer Drivers 309
Creating and Configuring TCP/IP Printer Ports 313
Managing Print Queues and Print Jobs 317
Summary 322
Part IV: Working with Active Directory 324
Chapter 10. Overview of Directory Services Commands 326
Introduction 327
Getting Started with DS Commands 327
Types of Objects for DS Commands 328
Querying the Directory Database with DSQuery 330
Adding New Objects with DSAdd 340
Displaying Object Properties with DSGet 348
Modifying Objects with DSMod 356
Moving and Renaming Objects with DSMove 360
Deleting Directory Objects with DSRm 361
Summary 363
Chapter 11. Managing Active Directory Users, Groups, and Computers 364
Introduction 365
Managing User Accounts 365
Managing Group Accounts 378
Managing Computer Accounts 384
Managing Domain Controller Accounts 389
Summary 393
Part V: Windows Networking 394
Chapter 12. Basic TCP/IP Networking Commands 396
Introduction 397
Overview of the Net Commands 397
Starting and Stopping TCP/IP Services 399
Troubleshooting Commands for TCP/IP 404
Commands for Remote Computers 423
Summary 429
Chapter 13. Administering Network Services 430
Introduction 431
Overview of the NETSH Commands 431
NETSH Commands for Troubleshooting 436
Managing Interfaces with NETSH 441
Managing Automatic Addressing Using DHCP Services 453
NETSH Commands for AAAA 458
Summary 461
Appendix A MS-DOS Commands Not Supported in Windows XP and Windows 2003 462
Introduction 462
MS-DOS Commands Not Supported in Windows XP/2003 32-Bit Operating Systems 462
MS-DOS Commands Not Supported in Windows XP/2003 64-Bit Operating Systems 469
Index 476

Introduction


Pawan Bhardwaj, MCSE, MCT, Security+, Network+, A +

Welcome to How to Cheat at Windows System Administration Using Command-Line Scripts. This book is designed to help you learn the power of Windows command shell. There was a time in the history of computers when there was no graphical user interface (GUI), and every small and big task was performed using the commands and batch files. With every new version of Windows, Microsoft is trying to ease administrators’ jobs by adding more and more layers of GUI or configuration wizards (dialog boxes). Although 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. There is certainly a way to avoid these wizards and still accomplish a given task using the command-line utilities included with the operating system.

Consider a situation where you wish to add a user to the Active Directory using the Windows wizards or the GUI, assign him/her appropriate permissions to access certain resources, and restrict access to others. It would take roughly one hour to complete the job. By using command line the same task could be done in about half the time. That not only saves you time but also increases your productivity as an administrator.

Although the importance of Windows GUIs should not be underrated, the command-line tools have their own importance and utility when it comes to increasing efficiency, boosting effectiveness, and saving time. Command-line tools are both problem solvers as well as time-savers. Not many administrators explore the usefulness of these tools. The purpose of this book is to let administrators know how to utilize these command-line tools to complete everyday administrative jobs, solve recurring network problems, and improve their efficiency.

This book contains a total of 13 chapters, divided into five different parts. The first part deals with the basics of Windows command shell, batch files, and scheduled tasks. The second part of the book deals with basic Windows system administration, which consists of managing files and hard disks. The third part of the book covers system services, event logs, performance, and printing services. In the fourth part of the book, we cover Active Directory services. The fifth part of the book deals with managing networking services in a Windows Server 2003 environment.

Your journey starts in Chapter 1 with the basics of the Windows command shell. You will learn how to access the command shell and how to customize its properties. You will learn that the command shell’s properties can be modified in several different ways to suit your needs. Installing the support tools included with the Windows Server 2003 setup CD Windows is also covered in this chapter. You will also learn how to access the Windows A-Z Command Reference available in the Help and Support Center.

In Chapter 2 we explain how to work safely with the command line using a nonadministrative account. While working with the command shell, you sometimes need to specify a path where commands or batch files are located. You will learn how to change or modify the command path by modifying the environment variable either from the command prompt or from the System Properties dialog box. This chapter also explains how to change command input and output from the standard keyboard and the command shell window, respectively, and how to handle errors generated by commands. Moving ahead, we will discuss the concept of creating simple batch files. You will learn about commonly used commands in batch files and how to use each command inside a batch file.

In Chapter 3, we discuss the task scheduler service, the Scheduled Tasks GUI, and the schtasks command-line utility. If the task scheduler service is not running, you will not be able to schedule any script or application to run automatically. The Scheduled Tasks wizard is a perfect tool for scheduling tasks to run at predetermined schedules, but you can also use the schtasks utility to perform the same tasks. This utility replaces the older AT command, which is still supported in Windows XP and Windows Server 2003. You will learn to use different subcommands of the schtasks utility to create, change, delete, query, run, or end a task. schtasks is considered to be one of the most complex command sets in Windows.

In Chapter 4, we discuss some of the very common commands used to manage and maintain files, folders, and floppy disks. Having in-depth knowledge of these commands, their syntax, and their use is a great help when you want to use them in batch files or scripts to simplify your administrative tasks. Traditional Copy, Xcopy, Move, and Del (Erase) commands are covered in this chapter, and examples of their usage are included. We continue with the discussion on the use of the Diskcopy command for duplicating disks and comparing disks using the Diskcomp command. Other commands related to file and folder management such as Tree, MD (Mkdir), and RD (Rmdir) are also covered in this chapter.

Chapter 5 covers maintenance of file systems and hard disks. The most notable utilities covered in this chapter include Fsutil, Chkdsk, and Defrag. The Fsutil utility is new to the Windows XP and Windows Server 2003 families of operating systems. Although you might have experience with older utilities such as Chkdsk and Defrag, you will need to have thorough knowledge of the operating systems to use the Fsutil command and its subcommands when creating scripts. We will also discuss Format, Convert, and Compact commands in this chapter.

Chapter 6 is dedicated to the Diskpart command-line utility used to manage hard disk partitions and volumes. This utility is different from other command-line utilities in that it runs in the Windows command shell as a text-based command interpreter. This utility consists of several commands that run only after the Diskpart interpreter has started. You can use this utility to perform simple disk-related tasks, such as creating and deleting partitions and volumes, and complex tasks, such as creating, maintaining, and managing fault-tolerant volumes. Because Diskpart works in a more enhanced mode than its counterpart, the Disk Management snap-in, it has more control over the selected disk, partition, or volume. Diskpart supports scripting, and you can create scripts to automate repeated disk-related administrative tasks. Diskpart error codes make it easy for you to handle command execution more precisely.

In Chapter 7, we explain some of the key issues with maintaining the Windows operating system, including services, drivers, and most importantly, the Windows Registry. We discuss the SC and Reg command-line utilities, which offer sets of several subcommands that are helpful in configuring and maintaining the Windows operating system. You will rarely need to edit the Windows Registry directly, either from the GUI or from the command line, but it is good to understand how you can query, add, delete, save, and restore Registry entries.

In Chapter 8, we discuss some command-line utilities for monitoring and managing event logs, processes, and performance logs. Monitoring is an important aspect of system and network administration, and you cannot ignore it. The command-line utilities related to managing Windows event logs covered in this chapter include Eventcreate, Euenttriggers, and Eventquery. You will learn how to view system services and applications using the TaskList command and how to terminate nonresponsive processes using the TaskKill command. This chapter also includes some command-line utilities for monitoring and managing performance logs. These utilities include TypePerf for displaying performance data in the command shell window, Lodctr for registering new performance counters in the Windows Registry, and Relog for extracting and resampling stored performance data.

We move on to Chapter 9 to discuss the command-line utilities used to manage printers and print jobs. It is interesting to note that most of these commands have very simple, facile syntax. You will learn that you can use the Prnmngr command to install printers while the Prncnfg command is used to view and configure installed printers. Other commands discussed in this chapter include Prndrvr, Prnport, Prnqctl, and Prnjobs to manage printer drivers, create and configure TCP/IP ports, manage print queues, and manage print jobs, respectively.

In Chapter 10, we introduce you to the basic syntax of the Directory Services (DS) commands for managing Active Directory objects. You will learn that the object classes that you can use with DS commands include computers (desktops and member servers), contacts, users, groups, servers (domain controllers), OUs, sites, subnets, quotas, and directory partitions. You will learn how to use the DSQuery command with different types of objects to search for objects in Active Directory, the DSGet command to display properties of specified objects, and the DSAdd and DSRm commands to add objects to or remove objects from the...

Erscheint lt. Verlag 9.10.2006
Sprache englisch
Themenwelt Sachbuch/Ratgeber
Informatik Betriebssysteme / Server Windows
Mathematik / Informatik Informatik Grafik / Design
Informatik Netzwerke Sicherheit / Firewall
Informatik Theorie / Studium Kryptologie
Wirtschaft Betriebswirtschaft / Management
ISBN-10 0-08-050826-X / 008050826X
ISBN-13 978-0-08-050826-9 / 9780080508269
Haben Sie eine Frage zum Produkt?
PDFPDF (Adobe DRM)

Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM

Dateiformat: PDF (Portable Document Format)
Mit einem festen Seiten­layout eignet sich die PDF besonders für Fach­bücher mit Spalten, Tabellen und Abbild­ungen. Eine PDF kann auf fast allen Geräten ange­zeigt werden, ist aber für kleine Displays (Smart­phone, eReader) nur einge­schränkt geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine Adobe-ID und die Software Adobe Digital Editions (kostenlos). Von der Benutzung der OverDrive Media Console raten wir Ihnen ab. Erfahrungsgemäß treten hier gehäuft Probleme mit dem Adobe DRM auf.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine Adobe-ID sowie eine kostenlose App.
Geräteliste und zusätzliche Hinweise

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
der leichte Weg zur eigenen Cloud.Daten sicher speichern und teilen

von Herbert Hertramph

eBook Download (2023)
MITP Verlags GmbH & Co. KG
24,99
Learn how to program with PowerShell 7 on Windows, Linux, and the …

von Nick Parlow

eBook Download (2024)
Packt Publishing (Verlag)
32,39