. Net code quickly converts to powershell code

Source: Internet
Author: User
Tags management studio sql server management sql server management studio

 

It has been nearly two years since the first technical preview of powershell 2. The following lists some new features added during this period.

    • remoting: You can run the cmdlet and script on a remote machine.
    • background tasks: You can use psjob to run background tasks locally and remotely.
    • scriptcmdlets: In the past, only the cmdlets can be compiled in a statically compiled language, such as C # and VB. Now you can directly use powershell scripts.
    • step-by-step pipeline: This pipeline can be considered to transmit only one element at a time.
    • data zone: The data zone can separate the script data from the logic. In addition to ease of management, it can also be used to build scripts that support internationalization.
    • script debugging: You can set breakpoints on "rows, columns, functions, variables, and annotations.
    • packaging Operator: You can use the @ operator to pass a set of key-value pairs as a single parameter.
    • powershell ise: "Integrated script environment" is a lightweight IDE. It consists of three parts. The top part is used to edit the script, and the following part is used to execute the instant command like a powershell prompt. However, this is not necessary because the top panel can also execute the selected command, just like SQL Server Management studio.
    • out-gridview: In addition to displaying data in the console, you can also send them to a pop-up window that contains instantly generated tables and supports sorting and filtering.
    • module: the module replaces snap-in to create reusable cmdlet, script, and provider libraries. Unlike the installation of snap-in, you can simply copy the module to a user-level or system-level directory, and then directly call it in the script.
    • event: WMI and CLR events can be sent to the event queue or directly bound to an action.
    • transaction: powershell already has a transaction framework, but currently only supports providers for the Registry.
    • Exception Handling: In powershell, try-catch-finally similar to Java, C #, and VB can be used to handle exceptions.
    • Add-type: Use codedom to compile Code segments in any. NET language.

You can download the powershell 2.0 candidate release that supports XP and later operating systems.

We used. Net to write many tools. Before powershell came, we all wrote them as the console.ProgramNow that we have a powerful powershell script tool, we are very familiar with how to quickly convert our rich tools into powershell scripts. net reflector this tool, Daniel cazzulino written powershell plug-in: http://reflectoraddins.codeplex.com/Wiki/View.aspx? Title = powershelllanguage.

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.