A Handy List of Windows Vista Command Line Tools and Commands

A Handy List of Windows Vista Command Line Tools and Commands
Page content

Windows Vista has many powerful command line tools which make performing certain tasks easy. Here is a detailed list of few of the commands. As you may notice, some of the tools were present in earlier version of Windows as well. Some of the commands need Administrator privilege.

ASSOC:

ASSOC displays or modifies file extension associations.

Syntax:

ASSOC [.ext[=[fileType]]]

Parameter List:.

ext: Specifies the file extension to associate the file type with

fileType: Specifies the file type to associate with the file extension

Typing ASSOC without parameters will display the current file associations.

GPRESULT :

Displays the Resultant Set of Policy (RSoP) information for a target user and computer.

Syntax:

GPRESULT [/S system [/U username [/P [password]]]] [/SCOPE scope] [/USER targetusername] [/V | /Z]

Parameter List:

S: Remote system to connect to.

U: User context under which the command should execute.

P: Password for the given user

SCOPE: Specifies whether the user or the computer settings needs to be displayed.

USER: User name for which the RSOP data is to be displayed.

V: Specifies that verbose information should be displayed.

Z: Specifies that the super-verbose information should be displayed.

Running GPRESULT without parameters will return the RSoP data for the current logged-on user on the computer it was run on.

SCHTASKS :

SCHTASKS enables an administrator to create and manage scheduled tasks on a local or remote system.

Syntax :

SCHTASKS /parameter [arguments]

Parameter List:

Create: Creates a new scheduled task.

Delete: Deletes the scheduled task(s).

Query: Displays all scheduled tasks.

Change: Changes the properties of scheduled task.

Run: Runs the scheduled task immediately.

End: Stops the currently running scheduled task.

To schedule a task on a remote system you have to specify the system [/s] . The syntax would be like

SCHTASKS /Run [/S system [/U username [/P password]]] /TN taskname

or

SCHTASKS End [/S system [/U username [/P password]]] /TN taskname

SYSTEMINFO:

SYSTEMINFO displays operating system configuration information for a local or remote machine.

Syntax:

SYSTEMINFO [/S system [/U username [/P [password]]]] [/FO format] [/NH]

Parameter List:

S: Denotes the remote system to connect to.

U: The user context under which the command should execute.

P: The password for the given user context.

FO: The format in which the output is to be displayed. Valid values: “TABLE”, “LIST”, “CSV”.

NH: (For “TABLE” and “CSV” formats only). Specifies that the “Column Header” should not be displayed in the output.

TASKLIST:

TASKLIST displays a list of currently running processes on either a local or remote machine.

Syntax:

TASKLIST [/S system [/U username [/P [password]]]] [/M [module] | /SVC | /V] [/FI filter] [/FO format] [/NH]

Parameter List:

S: The remote system to connect to.

U: The user context under which the command should execute.

P: The password for the given user context. Prompts for input if omitted.

M: Lists all tasks currently using the given exe/dll name.

SVC: Displays services hosted in each process.

V: Displays verbose task information.

FI: (Filter) Displays a set of tasks that match a given criteria specified by the filter.

FO: (Format) Specifies the output format. Valid values: “TABLE”, “LIST”, “CSV”.

NH: (For “TABLE” and “CSV” formats only). Specifies that the “Column Header” should not be displayed in the output.

TASKKILL:

TASKKILL used to terminate tasks by process id (PID) or image name.

Syntax:

TASKKILL [/S system [/U username [/P [password]]]] { [/FI filter] [/PID processid | /IM imagename] } [/T] [/F]

Parameter List:

S: The remote system to connect to.

U: The user context under which the command should execute.

P: The password for the given user context

FI: (Filter) Applies a filter to select a set of tasks.

PID: (Processid) Specifies the PID of the process to be terminated. You can lookup the PID with Tasklist.

IM: (Imagename) Specifies the image name of the process to be terminated.

T: Terminates the specified process and any child processes which were started by it.

F: Specifies to forcefully terminate the process.

TAKEOWN:

TAKEOWN allows an administrator to recover access to a file that was denied by re-assigning file ownership.

Syntax:

TAKEOWN [/S system [/U username [/P [password]]]] /F filename [/A] [/R [/D prompt]]

Parameter List:

S: The remote system to connect to.

U: The user context under which the command should execute.

P: The password for the given user context.

F: Specifies the filename or directory name pattern.

A: Gives ownership to the administrators group instead of the current user.

R: Instructs tool to operate on files in specified directory and all subdirectories.

D: Default answer used when the current user does not have the “list folder” permission on a directory. (Occurs while operating recursively (/R) on sub-directories).

IPCONFIG:

IPCONFIG displays all current TCP/IP network configuration values.

Syntax:

ipconfig [/allcompartments] [/? | /all | /renew [adapter] | /release [adapter] |/renew6 [adapter] | /release6 [adapter] | /flushdns | /displaydns | /registerdns | /showclassid adapter |/setclassid adapter [classid] ]

Parameter List:

?: Display Help Topics.

All: Display full configuration information.

Allcompartments: Display information for all compartments.

Release: Release the IPv4 address for the specified adapter.

release6: Release the IPv6 address for the specified adapter.

Renew: Renew the IPv4 address for the specified adapter.

renew6: Renew the IPv6 address for the specified adapter.

Flushdns: Purges the DNS Resolver cache.

Registerdns: Refreshes all DHCP leases and re-registers DNS names

Displaydns: Display the contents of the DNS Resolver Cache.

Showclassid: Displays all the dhcp class IDs allowed for adapter.

Setclassid: Modifies the dhcp class id.

CHKDSK:

CHKDSK checks a disk and displays a status report.

Syntax:

CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]] [/B]

Parameter List:

Volume: Specifies the drive letter or volume name.

Filename: (FAT/FAT32 only) Specifies the files to check for fragmentation

F: Fixes errors on the disk.

V: Displays the full path and name of every file on the disk (On FAT/FAT32). On NTFS: Displays cleanup messages if any.

R: Locates bad sectors and recovers readable information

L:size NTFS only: Changes the log file size to the specified number of kilobytes.

X: Forces the volume to dismount first if necessary.

I: NTFS only: Performs a less vigorous check of index entries.

C NTFS only: Skips checking of cycles within the folder structure.

B NTFS only: Re-evaluates bad clusters on the volume

About Windows Vista UAC and how to disable it.

Windows Vista DRM

Windows Vista Media Center - Watch Recorded Television

How Vista Improves the Tablet PC Experience