Help - Search - Members - Calendar
Full Version: Command line tools in XP
linux-noob.com/forums > Windows Noob > Tips and Tricks
Digerati
Command line tools in XP that are useful


bootcfg
View your boot loader settings, such as your default OS and selection timeout, as well as your boot entries and load options.


defrag
You probably already guessed that this defrags your hard drive. Type only "defrag" into your command prompt to get a list of possible arguments, such as the drive letter and the type of output.


diskpart
Manages your disk partitions. After you type "diskpart" into your command prompt, your prompt will become "DISKPART." Type a question mark to get a list of possible arguments. Type exit to leave diskpart.


driverquery
Will get you a nice list of your drivers and their properties.


fsutil
This is a handy command. You can do everything from managing your hardlinks to querying the free space in a volume. Type "fsutil" into your command prompt, and you'll see a list of options. I choose "fsinfo" from the list, so I type "fsutil fsinfo" into the prompt. Now I get even more options, but I choose drives by typing "fsutil fsinfo drives." It's fun, it's easy, and you'll get the hang of it. Explore this utility. There are a lot of cool features and hidden twists.


getmac
This gets the MAC (Media Access Control) address.


gpresult
Get the RSoP, user settings, and computer group policy settings.


helpctr
Starts the Help and Support Center.


ipseccmd
Configures Internet protocol security (IPSec) policies in the directory service or in a local or remote Registry. Ipseccmd is a command-line version of the IP Security Policies Microsoft Management Console (MMC) snap-in.


netsh
A network configuration tool. Type "netsh" to enter the tool, or "netsh /?" to learn more about it. To exit this tool, type "exit" at the "netsh>" prompt.


openfiles
Allows an administrator to display or disconnect open files in XP professional. Type "openfiles /?" for a list of possible parameters.


pagefileconfig
Displays and configures the paging file Virtual Memory settings of a system.


prncnfg
Configures or displays configuration information about a printer.


prnjobs
Pauses, resumes, cancels, and lists print jobs.


recover
This command attempts to recover readable information from a damaged disk. Type "recover" to get the syntax.


reg
The console registry tool. Get syntax help when you type "reg" into the prompt. You can export the registry, copy, restore, compare, and more.



schtasks
The administrator can schedule, run, change, or delete tasks on a local or remote machine. Type "schtasks /?" without the quotes for a list of options.


sfc
The system file checker scans protected system files and replaces the ones you (or your applications) hacked beyond repair with the real, official Microsoft versions. Type "sfc" into the command prompt to get a list of options.


shutdown
You can shut down or restart your own computer, or an administrator can shut down or restart a remote computer. Type "shutdown" into your command prompt to see a list of possible arguments.


systeminfo
Basic system configuration information, such as the system type, the processor type, your time zone, your virtual memory settings, and much more.


tasklist
Want to know what's going on behind the scenes? Type "tasklist" into the command prompt, and get a list of current processes.


taskkill
Now that you know what's going on behind the scenes, maybe you want to shut a few of these extraneous tasks down. That's where taskkill comes in. Type "taskkill /?" for a quick lesson in the syntax of the command, then shut down all those random processes. I just killed my MS messenger by typing "taskkill /PID 1680." I got the PID from running tasklist, above.


typeperf
Writes performance-counter data to the command window or to a supported log file format.
P38
I keep this info in a text file in the root directory of my windows machines. It comes in handy if I telnet in and can't remember a command.

http://www.microsoft.com/resources/documen...t_commands.mspx

Shutdown
Allows you to shut down or restart a local or remote computer. Used without parameters, shutdown will logoff the current user.
shutdown [{-l|-s|-r|-a}] [-f] [-m [\\ComputerName]] [-t xx] [-c "message"] [-d[u][p]:xx:yy]
Parameters
-l : Logs off the current user, this is also the defualt. -m ComputerName takes precedence.
-s : Shuts down the local computer.
-r : Reboots after shutdown.
-a : Aborts shutdown. Ignores other parameters, except -l and ComputerName. You can only use -a during the time-out period.
-f : Forces running applications to close.
-m [\\ComputerName] : Specifies the computer that you want to shut down.
-t xx : Sets the timer for system shutdown in xx seconds. The default is 20 seconds.
-c "message" : Specifies a message to be displayed in the Message area of the System Shutdown window. You can use a maximum of 127 characters. You must enclose the message in quotation marks.
-d [u][p]:xx:yy : Lists the reason code for the shutdown. The following table lists the different values.
/? : Displays help at the command prompt.

Tasklist
Displays a list of applications and services with their Process ID (PID) for all tasks running on either a local or a remote computer.
tasklist[.exe] [/s computer] [/u domain\user [/p password]] [/fo {TABLE|LIST|CSV}] [/nh] [/fi FilterName [/fi FilterName2 [ ... ]]] [/m [ModuleName] | /svc | /v]
Parameters
/s Computer : Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer.
/u Domain\User : Runs the command with the account permissions of the user specified by User or Domain\User. The default is the permissions of the current logged on user on the computer issuing the command.
/p Password : Specifies the password of the user account that is specified in the /u parameter.
/fo {TABLE|LIST|CSV} : Specifies the format to use for the output. Valid values are TABLE, LIST, and CSV. The default format for output is TABLE.
/nh : Suppresses column headers in the output. Valid when the /fo parameter is set to TABLE or CSV.
/fi FilterName : Specifies the types of process(es) to include in or exclude from the query. The following table lists valid filter names, operators, and values.
/m [ModuleName] : Specifies to show module information for each process. When a module is specified, all the processes using that module are shown. When a module is not specified, all the processes for all the modules are shown. Cannot be used with the /svc or the /v parameter.
/svc : Lists all the service information for each process without truncation. Valid when the /fo parameter is set to TABLE. Cannot be used with the /m or the /v parameter.
/v : Specifies that verbose task information be displayed in the output. Cannot be used with the /svc or the /m parameter.
/?: Displays help at the command prompt.

Taskkill
Ends one or more tasks or processes. Processes can be killed by process ID or image name.
taskkill [/s Computer] [/u Domain\User [/p Password]]] [/fi FilterName] [/pid ProcessID]|[/im ImageName] [/f][/t]
Parameters
/s Computer : Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer.
/u Domain\User : Runs the command with the account permissions of the user specified by User or Domain\User. The default is the permissions of the current logged on user on the computer issuing the command.
/p Password : Specifies the password of the user account that is specified in the /u parameter.
/fi FilterName : Specifies the types of process(es) to include in or exclude from termination. The following are valid filter names, operators, and values.
/pid ProcessID : Specifies the process ID of the process to be terminated.
/im ImageName : Specifies the image name of the process to be terminated. Use the wildcard (*) to specify all image names.
/f : Specifies that process(es) be forcefully terminated. This parameter is ignored for remote processes; all remote processes are forcefully terminated.
/t : Specifies to terminate all child processes along with the parent process, commonly known as a tree kill.
/?: Displays help at the command prompt.
znx
in addition to all these.. i really love SysInternals utils, id say a must have.
lerum
Netsend is quite cool if you want to talk to other windows machines with the messenger service activated.

I recommend Fomine NetSend for an easy to use netsend app.



Or it's:


NET SEND {name | * | /DOMAIN[:name] | /USERS} message

Sends messages to other users, computers, or messaging names on the network. The Messenger service must be running to receive messages.

You can send a message only to an name that is active on the network. If the message is sent to a username, that user must be logged on and running the Messenger service to receive the message.
name Is the username, computername, or messaging name to send the message to. If the name is a computername that contains blank characters, enclose the alias in quotation marks (" ").
* Sends the message to all the names in your group.
/DOMAIN[:name] Sends the message to all the names in the workstation domain. If name is specified, the message is sent to all the names in the specified domain or workgroup.
/USERS Sends the message to all users connected to the server.
message Is text to be sent as a message.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.