How to Cheat at Windows System Administration Using Command Line Scripts

With this chapter, we are stepping into the next round of command-line tasks that we can use to maintain a system. We will discuss how to obtain system configuration information, query and configure system services, obtain information about device drivers, shut down and restart local and remote systems, and work with the Registry from the command line. The main commands we will cover in this chapter include the Systeminfo command, for obtaining system configuration information; the Driverquery command, for getting information about device drivers; the SC ( Service Control) command set, for querying and configuring system services and device drivers; and the Reg command, for managing the Windows Registry. The SC and the Reg commands are composed of several subcommands and, as we will learn in this chapter, are very useful for troubleshooting as well as configuring local and remote computers. The Shutdown command allows you to shut down and restart a local or remote computer without having to be present at the console.
When you want to work with a system s components or configure any of its services and device drivers, it is helpful to get detailed information about the system s current configuration first. This information includes the system services, installed device drivers, their configurations, and hardware...