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.