title: PowerShell Az Analysis Services Merge-Partition -- getting credentials error
body: <p>We have a number of partitioned tables by month in Azure Analysis Services. The goal is for older months to be merged into annual partitions. In the past, Invoke-ASCmd was used with TMSQL to do this, but it was all hard coded, something that we very much want to avoid so that we don't have to manually maintain the process.</p>
  
  <p>The only real documentation I found is the Microsoft page <a href="https://docs.microsoft.com/en-us/powershell/module/sqlserver/merge-partition?view=sqlserver-ps" rel="nofollow noreferrer">here</a>.</p>
  
  <p>When I run the code below, I only get the model name back as a response and an error saying that the credentials are not correct. Is there something else I should be doing to make the Az function work?</p>