title: ExchangeOnlineManagement module, suppress update message in runbook
body: <p>An Azure Automation account runbook uses the ExchangeOnlineManagement module. A particular cmdlet is spewing a long message (below) about updating to <a href="https://www.powershellgallery.com/packages/ExchangeOnlineManagement/2.0.6-Preview6" rel="nofollow noreferrer">version 2.0.6</a>, which is still in preview.</p>
  <p>I assume, because it's in preview, it doesn't show up in the &quot;add module from PowerShell Gallery&quot; in the Azure Portal. I cannot figure out how to update our Azure automation account to use 2.0.6-Preview6, and only 2.0.5 is listed for import.</p>
  <p>Anyway, how can I suppress this message? I have the runbook getting fired from a MS Flow, and parsing JSON from the runbook output chokes on the unexpected non-JSON string.</p>
  <p>Here's the cmdlet in question that produces the message:</p>
  <pre><code>$exchangeConnection = Connect-ExchangeOnline -ExchangeEnvironmentName O365USGovGCCHigh –CertificateThumbprint $connection.CertificateThumbprint –AppId $connection.ApplicationID –ShowBanner:$false –Organization $tenant | Out-Null
  </code></pre>
  <p>Here's the annoying message that is output:</p>
  <pre><code>=============================================================
  
  New update available!
  You are using an older version of Exchange PowerShell cmdlets which may be using (soon to be deprecated) Basic authentication.
  Please install version 2.0.6 of the ExchangeOnlineManagement module to upgrade to the latest version of cmdlets, which are REST based, more secure, reliant and performant than the remote PowerShell cmdlets that you are currently using.
  
  For more information on the latest cmdlets released, visit: https://techcommunity.microsoft.com/t5/exchange-team-blog/exchange-online-powershell-v2-module-preview-now-more-secure/ba-p/2922946
  To download the latest version of the module, visit https://www.powershellgallery.com/packages/ExchangeOnlineManagement/2.0.6-Preview5
  
  ============================================================
  </code></pre>