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

Sayanil Datta 1 Reputation point
2022-03-31T06:45:35.967+00:00

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

https://powerbloggerbi.com/2016/06/20/extract-ssas-roles-and-user/

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,361 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,263 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ZoeHui-MSFT 35,556 Reputation points
    2022-04-01T03:46:46.237+00:00

    Hi @Sayanil Datta ,

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

    [Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices")  
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices.Tabular");  
      
    $SSASServer = New-Object Microsoft.AnalysisServices.Server  
    $SSASServer = New-Object Microsoft.AnalysisServices.Tabular.Server;  
    

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

    Regards,

    Zoe


    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