Exract all roles and users of SSAS Cubes using Powershell in SQL 2019

Sayanil Datta 1 Reputation point

I tried to extract all roles and users using the script available in the below link:


Its working fine for SQL 2014 and SQL 2016 but not working for SQL 2019.

May anyone please guide how to extract the roles and users from SQL 2019 SSAS cubes (tabular)

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,044 questions
SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,255 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ZoeHui-MSFT 34,426 Reputation points

    Hi @Sayanil Datta ,

    You are using SSAS cubes (tabular), please refer to below code.

    $SSASServer = New-Object Microsoft.AnalysisServices.Server  
    $SSASServer = New-Object Microsoft.AnalysisServices.Tabular.Server;  

    More details, see install-distribute-and-reference-the-tabular-object-model.



    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments