SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Get SSAS Tabular Model (2016) Roles using Powershell `

By Thasigan Chetty,

Open Powershell and execute the following script.

Or excute from a SQL server job.

Dont forget to update the script with the necessary server names.

Also create a table in a sql database.

[SSASDatabaseName] VARCHAR (XX)

,[SSASRole] VARCHAR (XX)

,[SSASUsername] VARCHAR (XX)

,[Timestamp] DATETIME2

And updates those details on the script ($query = "INSERT INTO [xyz].[dbo].[xyz]).

Total article views: 107 | Views in the last 30 days: 9
 
Related Articles
FORUM

varchar issue

varchar issue

FORUM

Tricky ...VARCHAR

VARCHAR logics

FORUM

Convert Char to VarChar

Using scripts

FORUM

Difference between varchar(max) and varchar(8000)

Difference between varchar(max) and varchar(8000)

Tags
powershell    
roles    
ssas    
tabular model    
 
Contribute