Windows 7 command line cheat sheet




















Powercfg Used to manage the Windows power management settings from the command line. Print Used to print a specified text file to a specified printing device. Pushd Used to store a directory for use, most commonly from within a batch or script program. Pwlauncher Used to enable, disable, or show the status of your Windows To Go start-up options. Qprocess Used to display information about running processes. Query Used to display the status of a specified service. Quser Used to display information about users currently logged on to the system.

Qwinsta Used to display information about open Remote Desktop Sessions. Rasdial Used to start or end a network connection for a Microsoft client. Rcp Used to copy files between a Windows computer and a system running the rshd daemon. Rd Shorthand version of the rmdir command. Recimg Used to create a custom refresh image. Recover Used to recover readable data from a bad or defective disk.

Reg Used to manage the Windows Registryfrom the command line. Regini Used to set or change registry permissions and registry values from the command line. Relog Used to create new performance logs from data in existing performance logs. Rem Used to record comments or remarks in a batch or script file. Ren The shorthand version of the rename command. Rename Used to change the name of the individual file that you specify.

Replace Used to replace one or more files with one or more other files. Reset This command, executed as reset session, is used to reset the session subsystem software and hardware to known initial values. Restore Used to restore files that were backed up using the backup command. Rexec Used to run commands on remote computers running the rexec daemon.

Rmdir Used to delete an existing or completely empty folder. Robocopy Used to copy files and directories from one location to another.

Route Used to manipulate network routing tables. Rpcping Used to ping a server using RPC. Rsh Used to run commands on remote computers running the rsh daemon. Rsm Used to manage media resources using Removable Storage. Rwinsta Shorthand version of the reset session command. Sc Used to configure information about services. Scandisk Used to start Microsoft ScanDisk, a disk repair program.

Scanreg This command starts Windows Registry Checker, a basic registry repair program and backup utility. Schtasks Used to schedule specified programs or commands to run a certain times. Sdbinst Used to deploy customized SDB database files. Secedit Used to configure and analyze system security by comparing the current security configuration to a template.

Setlocal Used to start the localization of environment changes inside a batch or script file. Setx Used to create or change environment variables in the user environment or the system environment. Sfc Used to verify and replace important Windows system files.

Shadow Used to monitor another Remote Desktop Services session. Shift Used to change the position of replaceable parameters in a batch or script file. Showmount Used to display information about NFS mounted file systems. Shutdown Used to shut down, restart, or log off the current system or a remote computer. Sort Used to read data from a specified input, sort that data, and return the results of that sort to the Command Prompt screen, a file, or another output device.

Start Used to open a new command line window to run a specified program or command. Subst Used to associate a local path with a drive letter. Systeminfo Used to display basic Windows configuration information for the local or a remote computer. Takeown Used to regain access to a file that that an administrator was denied access to when reassigning ownership of the file. Taskkill Used to terminate a running task. Telnet Used to communicate with remote computers that use the Telnet protocol.

Time Used to show or change the current time. Hardware Commands Cisco, Junos, F5 etc. Control panel tool Command. Proxy settings of Office authentication and Windows Update. Download Windows Command Reference. Displays environment variables. Operation Command Network Conection properties administration ncpa.

Operation Command Displays the name of the current directory. Changes the root directory, the top of the directory hierarchy for a drive. Operation Command Displays the contents of a text file. Copies one or more files from one location to another. Deletes one or more files. Display route details netstat -rn route print Add a route route add Delete the route route delete Displays this help message. Commnad Note pscp. List of DOS commands. Page Tools. Home About Contact My Sites cmdref.

One of the most important commands is Get-Service , which provides the user with a list of all services installed on the system, both running and stopped. This cmdlet can be directed by using specific service names or objects. If you wanted to restrict output to active services on your computer, input the following command:.

This cmdlet allows you to build reports with tables and color, which can help to visualize complex data. Simply choose an object and add it to the command. For example, you could type:. A better alternative command is:.

No less important for increasing visibility is the Export-CSV command. Every object has its own line or row within the CSV file. This command is primarily used to create spreadsheets and share data with external programs. This is because formatting objects results in only the formatted properties being placed into the CSV file rather than the original objects themselves. In the event that you want to send specific properties of an object to a CSV file, you would use the Select-Object cmdlet.

If you want to view all processes currently running on your system, the Get-Process command is very important. To get a list of all active processes on your computer, type:. To pick a specific process, narrow the results down by process name or process ID and combine that with the Format-List cmdlet, which displays all available properties. One of the most common reasons users look at event logs is to see errors.

If you want to see error events in your log, simply type:. Whenever this happens, you can use Get-Process to retrieve the name of the process experiencing difficulties and then stop it with the Stop-Process command. Generally, you terminate a process by its name. It may have its own unique cmdlets, but a wealth of online resources can help you with any administrative task you can think of. To get the most out of PowerShell, you simply need to get used to the multitude of commands available to you.

Make sure you start out with the command line interface before graduating to the full-blown GUI. The most important navigation actions you need to know for PowerShell is how to get into it and how to get out again.

The easiest way to access the PowerShell environment is to type PowerShell in the search field of your taskbar. The proper way to close the window is to type exit and the command prompt. The standard navigation commands of the Command Prompt work in PowerShell so use cd to change directory. Enter a drive letter followed by a colon eg.

D: to switch to another drive. PowerShell is an advancement on Command Prompt because its shell scripting capabilities include better programming constructs than those available for batch jobs in Command Prompt. All of the Command Prompt commands are available in PowerShell but then PowerShell has extra commands and utilities, called cmdlets. Bash scripting is a Unix shell script. As Linux is an adaptation of Unix, a shell script written for Linux is often called a Bash script.

There are a lot of online tutorials on how to create a Bash script. In order to avoid confusion, try not to refer to a PowerShell script as a Bash script. To stick with Command Prompt, go to the Start menu and click on Settings. In the Settings menu, select Personalization.

Select Taskbar in the left-hand menu of the Personalization Settings Window. Set that to Off. Click OK to run as Administrator. Type powershell into the Taskbar search field. Select Run as Administrator from the list of options in the right panel of the results list. Open the Command Prompt, type powershell, and hit Enter. Type start-process PowerShell -verb runas and press Enter. If your PowerShell command requires a value in quotes, use single quotes in there instead of double-quotes. The surrounding quotes in the execution example here should remain as double-quotes.

This site uses Akismet to reduce spam. Learn how your comment data is processed. Comparitech uses cookies. More info.



0コメント

  • 1000 / 1000