Differences

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

2016-08-28 2016-11-21
it's just powershell now (martin) using ps> interwiki link (martin)
Line 18: Line 18:
</code> </code>
-Note that by default, executing PowerShell scripts is disabled. To override that, you can either lift the restriction by typing using ''[[https://technet.microsoft.com/en-us/library/hh849812.aspx|Set-ExecutionPolicy]]'' cmdlet on PowerShell administrator console((Run ''powershell.exe'' as Administrator to get PowerShell console.)):+Note that by default, executing PowerShell scripts is disabled. To override that, you can either lift the restriction by typing using ''[[ps&gt;microsoft.powershell.security/set-executionpolicy|Set-ExecutionPolicy]]'' cmdlet on PowerShell administrator console((Run ''powershell.exe'' as Administrator to get PowerShell console.)):
<code powershell> <code powershell>
Line 39: Line 39:
==== [[loading]] Loading Assembly ==== ==== [[loading]] Loading Assembly ====
-PowerShell script needs to load the assembly before it can use classes the assembly exposes. To load assembly use ''[[https://technet.microsoft.com/en-us/library/hh849914.aspx|Add-Type]]'' cmdlet.((In PowerShell 1.0, use ''[[msdn>System.Reflection.Assembly.LoadFrom]]'' method.))+PowerShell script needs to load the assembly before it can use classes the assembly exposes. To load assembly use ''[[ps&gt;microsoft.powershell.utility/add-type|Add-Type]]'' cmdlet.((In PowerShell 1.0, use ''[[msdn>System.Reflection.Assembly.LoadFrom]]'' method.))
<code powershell> <code powershell>
Line 68: Line 68:
If you need to make use of these events: If you need to make use of these events:
  * Define event handling function;   * Define event handling function;
-  * Associate the event handling function with an instance of ''Session'' class using ''.add_Event'' method, where ''Event'' is a name of the event.((Avoid using ''[[https://technet.microsoft.com/en-us/library/hh849929.aspx|Register-ObjectEvent]]'' cmdlet, as it introduces threading problems and possible crashes.))+  * Associate the event handling function with an instance of ''Session'' class using ''.add_Event'' method, where ''Event'' is a name of the event.((Avoid using ''[[ps&gt;microsoft.powershell.utility/register-objectevent|Register-ObjectEvent]]'' cmdlet, as it introduces threading problems and possible crashes.))
See following code snippet: See following code snippet:

Last modified: by martin