Introduction to the Windows7 command prompt PowerShell

Source: Internet
Author: User
Keywords nbsp can syntax view

&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; The Windows PowerShell command prompt is a language that supports objects, and we can simply assign the result returned by the command to a variable, $files contains a collection of objects in the table of contents that are in the previous directory, and use the normal array access syntax to get the object at that location. The Program Files directory is shown in the example. Note that the array subscript in PowerShell starts at 0. This is exactly the same as the. Net Common Language Runtime.

PowerShell's original blueprint was the POSIX shell standard, and borrowed a lot of the essence of the Perl language, providing an object-based scripting environment. PowerShell v1 (version 1.0) wants the user to interact with the object, but does not really provide object-oriented syntax (but, by virtue of the PowerShell mechanism, you can implement this syntax yourself). And a lot of the features are the same as the C # language, so the C # to PowerShell conversion is very easy.

Command prompt Windows PowerShell is Microsoft's Windows system-driven shell and scripting language technology that makes up for the lack of windows in the shell compared to UNIX systems. It also provides a more efficient scripting tool for program developers. In the system and network management, maintenance work plays an important role. Microsoft's latest Windows7 system also brings us a version of CMD's upgraded Windows PowerShell, which allows computer users to manage the system more efficiently. What exactly is Windows PowerShell, and what can it do? Let's learn it together.

To start Windows PowerShell in a Windows 7 system is very simple, click the "Start" button in the bottom of the search box to enter PowerShell, in the search results in the selection of Windows PowerShell can enter the command line mode interface, You can enter the graphics window mode to Windows PowerShell after you select Windows PowerShell V2 ISE. In addition, you can enter PowerShell in the traditional CMD window and run PowerShell after the next picture.

Use the outside Fast Start program

For some commonly used commands, PowerShell also supports setting them to alias usage. For example, you need to give get-process settings, you can enter Set-alias GP get-process in the PowerShell, where the GP for the command get-process. Press ENTER directly after the GP can replace the get-process command.

In the same vein, many system-built tools can also be set in the PowerShell alias, such as in the PowerShell input Notepad, you can start Notepad. To start Notepad faster, you can set an alias for it, enter Set-alias NP Notepad, press ENTER, and then enter NP again to open Notepad.

PowerShell also has management system services, operation of the Registry and a number of network-related operations, not one of the introduction, interested friends may wish to log in to Microsoft's official site to get more and more information related to PowerShell.

PowerShell

Compared with traditional command-line tools, PowerShell is unfamiliar to many users. What orders do PowerShell support? In fact, PowerShell can manage system process, service, registry, system log and even certificates and many other content. To find out what commands it supports, simply type Get-command in the window and press the next drawing, which displays all PowerShell supported commands.

In addition to displaying the type of command, the name and description are displayed. To see the detailed usage of a command you can use the Get-helt command to get help, such as to view the details of the add-content command, you can enter Get-help add-content, press ENTER after the name of the command, summary, syntax, detailed description, RELATED LINKS and notes. To get a better understanding of PowerShell, you need to be constantly getting help.

PowerShell Application

PowerShell can easily view and end processes within the system, so that not only can you monitor suspicious processes within your system, but you can also easily turn them off. To view processes within the current system, you need to open PowerShell, enter Get-process, and then press ENTER, so that the process's handle, the process name, the process's processor time, and the process-unique identifier are 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 as prompted, and the process can be automatically terminated when you press ENTER.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.