title: azure devops build task warning in powershell using dbatools
body: <p>I have a azure devops powershell build task that is throwing warnings however, I am not sure how to capture those warning in the build logs. </p>
  
  <pre><code>2018-10-31T18:19:37.9619067Z WARNING: [13:19:37][Publish-DbaDacPackage] Deployment failed | DropExtendedPropertiesNotInSource conflicts with the 
  2018-10-31T18:19:37.9621270Z selected DoNotDropObjectType ExtendedProperties
  </code></pre>
  
  <p>Example Code: </p>
  
  <pre><code>try
      {
          $dacpac = "$($ArtifactPath)\DatabaseProjects\$($db)\bin\$($BuildConfig)\$($db).dacpac"
          $publishProfile = "$($ArtifactPath)\DatabaseProjects\$($db)\$($db).publish.xml"
          Publish-DbaDacPackage -SqlInstance $Sql -Database $db -Path $dacpac -PublishXml $publishProfile -GenerateDeploymentScript -ScriptOnly -OutputPath $OutPath
  
      }  
  Catch
          {
              $ErrorMessage = $_.Exception.Message
              $FailedItem = $_.Exception.ItemName
              Write-Host "  The database: $($db) failed during process. See error message here: $($ErrorMessage)."
              Write-Host "    Failed item: $($FailedItem)"
          }
  </code></pre>
  
  <p>Any help is most appreciated!</p>