Failed to run PowerShell due to improper official translation a case _php tutorial

Source: Internet
Author: User

A case of PowerShell failure due to improper official translation


Today I saw an article in Powershell.com, is about the application of the GridView, feel very good, decided to try it yourself. But the actual operation of the time has failed, and then began a long row of mistakes.

Http://powershell.com/cs/blogs/tips/archive/2012/01/13/create-own-driver-tool.aspx

First we run, the error is as follows, said "state" this field already exists, what is this ghost?

In the command, a parameter was used

Convertfrom-csv, it will format the data into a CSV style, it is the default "," separate, but it also has a requirement, that is, cannot have the same column appear.

Let's just run it, don't process the data, and see what's going on ...

What the hell are these two "states"?

Find an English version of the machine to run and see what's going on. It turns out that Microsoft has translated state and status.

Here, the state should be a verb, the status is a noun, the other is a difference, but it can be translated into Chinese "status". Although translation can be used, it does not conform to the rules of PowerShell. This article was written in 2012, this year, Microsoft has not found this problem hey. (I think a translation into a state, the second translation into a situation here is more appropriate.) )

Since this has been done, I changed a method in the Chinese environment to execute. As follows:

Add a parameter and give him a subtitle. Of course use Out-file then import-csv also can.

1 driverquery.exe/v/fo CSV | Convertfrom-csv-header "module name", "Display Name", "description", "Driver Type", "Startup Mode", "status", "State S", "Accept Stop", "Accept pause", "Paged Pool (bytes)", "Code (bytes)", "BSS (bytes)", "Link Date", "path", "Init (bytes)" |select "module name", "Display Name", "description", "Driver Type", "Startup Mode", "status", "State S", "Accept Stop" | Out-gridview-title "Loaded Master"

Look at the results, the first line is not what I want, but the rest of the content OK, so the basic still completed the demand.

Microsoft Cloud Solution High-end top group "236804566" to share the achievement of cattle B road


Welcome to Sina Weibo @ Fat nine uncle
  • "Microsoft System Center R2 Private Cloud Deployment" is now available
  • http://www.bkjia.com/PHPjc/1088145.html www.bkjia.com true http://www.bkjia.com/PHPjc/1088145.html techarticle An example of PowerShell failure caused by improper official translation I saw an article in powershell.com today, it is about the application of the GridView, feel very good, decided to try it yourself. But the real ...

  • 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.