ayi <p>Dans PowerShell, comment définir une fonction dans un fichier et l’appeler depuis la ligne de commande PowerShell ?</p>
ayi_2 <p>Essayez ceci depuis la ligne de commande PowerShell :</p> <pre><code class="lang-auto">. .\MyFunctions.ps1 A1 </code></pre> <p>L’opérateur point est utilisé pour l’inclusion de scripts, aussi appelé « dot-sourcing » (ou <a href="https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_scopes?view=powershell-5.1#using-dot-source-notation-with-scope">« notation de source par point »</a>)</p>