title: Create adalsql.dll Azure Automation Module (The module was expected to contain an assembly manifest)
body: <p>I need to use the adalsql.dll in Azure Automation so I can connect to Azure SQL via the Active Directory Password Authentication mode. See this post for details: <a href="https://stackoverflow.com/questions/45091135/active-directory-password-connection-azure-sql-failure-from-azure-automation/45093784#45093784">Active Directory Password Connection Azure SQL Failure from Azure Automation</a></p>
  
  <p>Downloading this MSI extracts the adalsql.dll to C:\Windows\System32: <a href="https://www.microsoft.com/en-us/download/details.aspx?id=48742" rel="nofollow noreferrer">https://www.microsoft.com/en-us/download/details.aspx?id=48742</a></p>
  
  <p>Per research and the advice given, creating a Azure Automation Module seems to be the way to go. However, I have not found guidance on how to create a module when I just need to add the DLL. </p>
  
  <p>I created the following directory structure (which I end up zipping for upload):</p>
  
  <pre><code>Microsoft.ADAL.SQL
       Microsoft.ADAL.SQL.psd1 (Manifest)
       Microsoft.ADAL.SQL.psm1 (actual PowerShell to load the dll)
       adalsql.dll 
  </code></pre>
  
  <p>In my psm1 file I am using the following:</p>
  
  <pre><code>Add-Type -Path "C:\Modules\User\Microsoft.ADAL.SQL\adalsql.dll"
  </code></pre>
  
  <p>I am able to import this to Azure Automation and it shows as available (with files in the 'C:\Modules\User\Microsoft.ADAL.SQL' directory, but when I run my Runbook, it fails with the same message as before:</p>
  
  <blockquote>
    <p>New-Object : Exception calling ".ctor" with "1" argument(s): "Keyword
    not supported: 'authentication'."</p>
  </blockquote>
  
  <p>If add the Add-Type line from above in my Runbook, it also generates the error of: </p>
  
  <blockquote>
    <p>Add-Type : Could not load file or assembly
    'file:///C:\Modules\User\Microsoft.ADAL.SQL\adalsql.dll' or one of its
    dependencies. The module was expected to contain an assembly manifest.</p>
  </blockquote>
  
  <p>Do I need to adjust my PowerShell to load the dll? If so, how?</p>