09.02.2014 Views

Windows sysinternals

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 6 Pstools 173<br />

Some of the utilities perform remote operations simply by using <strong>Windows</strong> APIs that allow<br />

specification of a remote computer on which to operate. Some of the utilities accomplish<br />

remote operations by extracting an EXE file embedded in its executable image, copying<br />

that file to the remote computer’s Admin$ share, registering it as a service on that system<br />

and starting that service using the <strong>Windows</strong> Service Control Manager APIs, and then communicating<br />

with that service using named pipes. Creating a remote service requires that file<br />

sharing and the Admin$ share be enabled on the target computer. A table at the end of this<br />

chapter lists which of the PsTools utilities require these features for remote operation.<br />

Remote Operations on Multiple Computers<br />

Several of the utilities can operate on multiple remote computers with a single command.<br />

(The table at the end of this chapter lists which ones support this feature.) For these utilities,<br />

you can specify the remote computers directly on the command line or in an input file.<br />

The command-line syntax is a pair of backslashes, followed by the computer names or IP<br />

addresses separated with commas and with no spaces between them. For example:<br />

psinfo \\server1,server2,192.168.0.3,server4<br />

That command line lists system information from server1, then from server2, then from the<br />

computer at IP address 192.168.0.3, and finally from server4.<br />

Another way to specify the remote computers for utilities that can operate on multiple<br />

computers is by using a text file containing each computer name or IP address on a separate<br />

line, and naming the file on the command line prefixed with an @ symbol. The previous<br />

example can be accomplished with a file called computers.txt containing the following lines:<br />

server1<br />

server2<br />

192.168.0.3<br />

server4<br />

And then running the following command line:<br />

psinfo @computers.txt<br />

Finally, for the utilities that can operate on multiple remote computers, passing \\* on<br />

the command line directs the utility to operate on all computers in the current domain or<br />

workgroup:<br />

psinfo \\*<br />

If none of these options are used, the utility operates on the local computer.<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!