tisdag 7 december 2010

Run C# code in PowerShell

Do you have any utility you written in C# that you dont want to rewrite for PowerShell? If you use PowerShell V2 you dont need to. Theres a nifty little cmdlet named Add-Type that generates a new .Net assembly using a C# code file. The new assembly is placed in memory and is available from your PowerShell script. Read more about it at Stefan Gossners blog: http://blogs.technet.com/b/stefan_gossner/archive/2010/05/07/using-csharp-c-code-in-powershell-scripts.aspx

Inga kommentarer:

Skicka en kommentar