Created
June 7, 2018 08:09
-
-
Save morriekken/a1646c2bd70d150c33815ae8ce89c77c to your computer and use it in GitHub Desktop.
PS, Get all users, groups and roles for each SSAS database on server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices") | |
$ServerName = "YOURSERVERNAME" | |
$Server = New-Object Microsoft.AnalysisServices.Server | |
$Server.Connect($ServerName) | |
$result += $Server.Databases | Select Name, @{Name='Roles'; Expression={$_.Roles.Name}}, @{Name='Members'; Expression={$_.Roles.Members.Name}} | |
$result | Select * | ConvertTo-Json -Depth 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment