Differences

This shows you the differences between the selected revisions of the page.

2014-05-09 2014-06-12
proper wp article name (martin) using Add-Type cmdlet instead of Assembly.LoadFrom method (martin)
Line 39: Line 39:
==== Loading Assembly ==== ==== Loading Assembly ====
-PowerShell script needs to load the assembly before it can use classes the assembly exposes. To load assembly use method ''[[msdn>System.Reflection.Assembly.LoadFrom]]''. You may want to redirect diagnostic output of the method to ''[[http://technet.microsoft.com/en-us/library/hh849716.aspx|Out-Null]]''.+PowerShell script needs to load the assembly before it can use classes the assembly exposes. To load assembly use ''[[http://technet.microsoft.com/en-us/library/hh849914.aspx|Add-Type]]'' cmdlet.((In PowerShell 1.0, use ''[[msdn>System.Reflection.Assembly.LoadFrom]]'' method.))
<code powershell> <code powershell>
-[Reflection.Assembly]::LoadFrom("WinSCPnet.dll") | Out-Null+Add-Type -Path "WinSCPnet.dll"
</code> </code>

Last modified: by martin