Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Symptoms

Assume that you use the Invoke-AsCmd cmdlet in PowerShell and XML for Analysis (XMLA) in SQL Server Management Studio (SSMS) for Microsoft SQL Server 2012 Analysis Services (SSAS 2012) or SQL Server 2014 Analysis Services (SSAS 2014) processing. In this situation, you experience the following behavior difference for the returned output:

  • When you use the following PowerShell command to capture warning messages:Invoke-Ascmd -InputFile:"<input.xmla>" -Server:"<servername>" -OutVariable out -WarningVariable w If the command receives any warning message, the warning message is not captured in the return code. However, the warning message is captured if you run the same XMLA command from SSMS.

  • When you use the following PowerShell command to capture error messages:Invoke-Ascmd -InputFile: :"<input.xmla>" -Server:"<servername>" -ErrorVariable e -OutVariable out -WarningVariable w If the command receives any error message, the error message is included in the Warning tag but is not captured in the return code. However, the error message is included in the Error tag and is captured in the return code if you run the same XMLA command from SSMS.


Cause

This issue occurs because the Invoke-AsCmd cmdlet ignores warning messages but captures error messages, and it uses wrong templates to generate return output.

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×