Powershell commands for Windows 7 - easier to use, more efficient

  

Windows PowerShell is a shell and scripting language technology developed by Microsoft for Windows. Its appearance also makes up for the lack of Windows in the Shell compared with the Unix system, and also provides a more efficient writing for the program developers. Scripting tool. PowerShell V2 has been integrated in Windows 7 and supports graphical interface operations.

To start Windows PowerShell on Windows 7 system is very simple, click the "Start" button, enter PowerShell in the search bar at the bottom, select Windows PowerShell in the search results to enter the command line mode interface, After selecting Windows PowerShell V2 ISE, you can enter the graphical window mode of Windows PowerShell. In addition, you can also enter PowerShell in the traditional CMD window and then press Back to run PowerShell.

PowerSHell Getting Started

PowerShell is very strange to many users, compared to traditional command-line tools. What commands does PowerShell support? In fact, PowerShell can manage system processes, services, registry, system logs and even certificates. To find out which commands it supports, just type get-command in the window and press back to draw. All the commands supported by PowerShell will be displayed on the screen.

In addition to displaying the type of command, the name and description are also displayed here. To see the detailed usage of a command, you can use the get-helt command to get help. For example, to view the details of the add-content command, you can type get-help add-content and press Enter to display the command. Name, abstract, grammar, detailed description, related links, and notes. To get a deeper understanding of PowerShell, you need to get help often.

PowerShell Application

PowerShell makes it easy to view and end processes within the system, so you can not only monitor suspicious processes within the system, but also easily shut them down. To view the processes in the current system, you need to open PowerShell, enter get-process and press Enter, so the handle of the process in the system, the process name, the process occupied processor time and the process unique identifier will be displayed.

If you want to end one or more processes, you need to record the unique identifier of the process. After entering Stop-process in PowerShell, enter the ID of one or more processes according to the prompt, press Enter. The process can be automatically ended.

For some commonly used commands, Powershell also supports setting it as an alias. For example, if you need to set the get-process, you can enter set-alias gp get-process in Powershell, where gp is the command get-process. You can use the gp instead of the get-process command after pressing Enter.

Similarly, many built-in tools can also set aliases in Powershell. For example, you can start Notepad after entering the notepad in Powershell. To start Notepad faster, you can set an alias for it, type set-alias np notepad and press Enter, so you can open Notepad by typing np again.

PowerShell also has management system services, operating the registry and numerous network-related operations. I will not introduce them here. Interested friends may wish to log on to Microsoft's official website to get more information about PowerShell.

Copyright © Windows knowledge All Rights Reserved