Dynamic binary modules

Using add-type and import-module you can dynamically compile and load an assembly without any intermediate assembly files to cleanup. For instance, to run a cmdlet on a remote machine you could send over the cmdlet source code, compile, import, and run it all on the fly. Let’s say you have your cmdlet called Use-MyCmdlet as C# code in the file mycode.cs: PS> [ string ] $code = Get-Content mycode Read More...

Read the complete post at http://blogs.msdn.com/powershell/archive/2009/07/22/dynamic-binary-modules.aspx


Posted Jul 22 2009, 12:47 PM by Windows PowerShell Blog
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.