Skip to content

Instantly share code, notes, and snippets.

@xcud
Created January 31, 2013 15:30
Show Gist options
  • Save xcud/4683707 to your computer and use it in GitHub Desktop.
Save xcud/4683707 to your computer and use it in GitHub Desktop.
Pipeable shortcut for [reflection.assembly]::LoadFrom
<#
.Synopsis
Pipeable shortcut for [reflection.assembly]::LoadFrom.
.Example
PS> dir c:\foo.dll | Load-Assembly
GAC Version Location
--- ------- --------
False v2.0.50727 C:\foo.dll
#>
function Load-Assembly {
param( [Parameter(Mandatory=$True, Position=0, ValueFromPipeline=$true)] $Path);
[reflection.assembly]::LoadFrom($Path)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment