title: How do I import a PowerShell module for use by a pipeline task
body: <p>I'm creating a Build Pipeline in Azure DevOps. I have a PowerShell task that invokes a script inside a file - it's not "inline" PowerShell. That script needs the <code>Az.Accounts</code> module so I added <code>Import-Module Az.Accounts</code>. When I run the pipeline, I get the following:</p>
  
  <pre><code>Import-Module : The specified module 'Az.Accounts' was not loaded because no valid module file was found in any module 
  directory.
  At D:\a\1\s\XXX\XXX\XXX.ps1:14 char:1
  + Import-Module Az.Accounts
  + ~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : ResourceUnavailable: (Az.Accounts:String) [Import-Module], FileNotFoundException
      + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
  </code></pre>
  
  <p>How do I add the missing module so my script can run?</p>