pharaoh fortune slot
ExamNotes.net
Welcome, Guest. Please login or register.
November 18, 2017, 02:30:34 AM

Login with username, password and session length
* Home Help Search Login Register
+  ExamNotes.net
|-+  Microsoft (MCSE, MCSD, MOUS, MCAD)
| |-+  Server 2003
| | |-+  Take a look at the new command line tools in WS2K3
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Take a look at the new command line tools in WS2K3  (Read 1207 times)
mrdelete
Junior Member
Newbie
*
Offline Offline

Posts: 15

0


View Profile
« on: April 24, 2003, 07:54:51 AM »

Compared to Windows 2000 Server, Windows Server 2003 Standard Edition (WS2K3) offers almost forty new command line tools for administrators to use. Many of the tools available are also available on Windows XP, but this is the first appearance of these tools on the server product line. I'm going to introduce four of these new tools and provide usage examples to help you get a better grasp of WS2K3.

Clip.exe
WS2K3 provides clip.exe as a new tool that lets you redirect command prompt output to the Windows clipboard. Administrators have for a long time redirected output to a text file for later manipulation, but this tool allows them to save a step when they simply want to copy the output in order to be able to paste it somewhere else.

Here is a short example of a quick recursive directory search of all files on the C: drive of a server:
C:\> dir *.* /s | clip

With the output being piped to the "clip" command, this puts the entire set of results into the Windows clipboard. You can then paste this into a word processor or another program.

Driverquery.exe
Driverquery.exe allows administrators to view a list of installed device drivers. This command line tool can be run over the network (with proper credentials) and can be used to evaluate various versions of Windows. The example below shows the running of driverquery twice‘«Ųonce for the local machine and once for another Windows 2000 Server on the network. The /v option allows you to run the query in verbose mode. This mode gives more detailed results.
C:\>driverquery /v | clip
C:\>driverquery /s s-rwv-2k /v | clip

This tool is useful because it shows device drivers that are installed, regardless of whether they are in use. I placed the results of these commands into the clipboard (using clip.exe) and then put them into a word processing document. One word of warning: The results can be a little difficult to read because of the width of the columns. A 1280 x 1024 screen is not even enough to cover the full width of all of the columns, which means you'll need to scroll across the screen to look at all of the data.

This will be a useful tool for administrators to run in environments where numerous servers exist. Administrators can use driverquery.exe to check the status of the hardware and can paste the results into a text document that can be searched for suspicious states or contraband devices on various systems.

Eventcreate.exe
This tool lets you put custom entries into the Event Viewer. This can be on your local server or another Windows Server 2003 computer on your network. Eventcreate.exe can also send messages to Windows 2000 computers, but because a version of the tool specific to Win2K is not available, there are usually some errors that appear inline in the log.

Now, I will illustrate a simple example to send a message to another WS2K3 computer on my network. I have two WS2K3 computers on the test network. The primary one is S-RWV-NET and the other one is S-RWV-NET-2. From the S-RWV-NET computer, I entered the following command:
eventcreate /s s-rwv-net-2 /T Success /d "Test via LAN to other PC" /id 390

Windows accepted the command and the destination, since the two computers are members of the same domain, and I am logged on as a user with adequate rights for the task. The result looks like this:
SUCCESS: An event of type 'Success' was created in the 'Application' log with 'EventCreate' as the source.

This tool would be useful to the administrator in circumstances where changes on one server would directly impact another server‘«÷s processes, applications, or connectivity. Eventcreate.exe allows you to specify which log the message appears in, the type (success, error, warning, or information), the source for the event, and other options. This could become a valuable tool to log various events of networked computers in the background, using some crafty batch files.  

Schtasks.exe
The AT command has been one of the most useful Windows administrator tools through many Windows releases. Windows Server 2003 replaces the AT command with Sctasks.exe, although AT still works. Sctasks.exe introduces many options for the administrator to schedule tasks to run on the server. Some of the new options are:

Schedule: Administrators now have the option to run scheduled tasks daily, weekly, monthly, or once on system startup, on logon, and on idle.
Modifiers: There is now more granularity on the recurrence of the scheduled tasks. Options include minute options (1-1439), hour (1-23), day (1-365), week (1-52), month (1-12), or position of day options, such as "first," "second," "third," "fourth," "last," and "lastday."
Remote Computer: You can run tasks on remote computers and specify credentials to schtasks instead of providing authentication info in the first line of your task (e.g., as part of a .bat or .cmd file).
Export Schedule: Schtasks allows you to query the scheduled tasks and deliver the results to a specified format such as a list, a table, or a .csv file.

Shocked
Logged

Mr.DeLeTe
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!