It's been nearly two years since the first technical preview of PowerShell 2, and here's a list of some of the new features added during this time. 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: Cmdlet can only be written in a static compiled language before, such as C # and VB. You can now write directly using the PowerShell script. Step pipe: You can think of a pipe that transmits only one element at a time. Data area: The data area can separate the script's data from the logic, and can be used to build scripts that support internationalization, in addition to being easy to manage. Script debugging: You can set breakpoints on rows, columns, functions, variables, and comments. Packing operator: You can use the @ operator to pass a set of key value pairs as a single parameter. PowerShell ISE: "Integrated scripting Environment" is a lightweight IDE. It consists of three parts, the top part is used to edit the script, and the following section, like the PowerShell prompt, is used to execute the immediate command. This is not necessary, however, because the top panel can also perform the selected command, just like SQL Server Management Studio. Out-gridview: In addition to displaying the data in the console, you can also choose to send them to a pop-up window that contains instantly generated forms and supports sorting and filtering. Modules: Modules will be used instead of snap-in to create reusable cmdlet, script, and provider libraries. Unlike the snap-in need to install, you can simply copy the module to a user-level or system-level directory, and you can then invoke it directly in the script. Events: WMI and CLR events can be sent to an event queue or directly bound to an action. Transaction: PowerShell already has a transaction framework, but currently only supports provider for the registry. Exception handling: You can use try-catch-finally in PowerShell like Java, C #, and VB to place exceptions. Add-type: Use CodeDom to compile code snippets for any. NET language.
The PowerShell 2.0 release version, which supports XP and later operating systems, is already available for download.
We've written a lot of tools in. NET, and before PowerShell arrives, we've written a console program to do this, and now we have a powerful PowerShell scripting tool, how to quickly convert our rich tools into PowerShell scripts, and we're all very familiar with. Net Reflector This tool, Daniel Cazzulino writes the PowerShell plugin: http://reflectoraddins.codeplex.com/Wiki/View.aspx?title= Powershelllanguage.