Powershell Commands for SQL Server
SQLPS
The SQLPS utility is being replaced by the sqlps module:
Import-Module "sqlps" -DisableNameChecking
To run this interactively against a remote server, enter a remoting session:
Enter-PSSession -ComputerName HOST-NAME -Credential DOMAIN\user
Add a User to a SSAS Role
This solves the problem of adding a domain user to a SSAS database role from a different domain which cannot be done from the SSAS project or via SSMS (XMLA) from outside the domain since these methods attempt to resolve credentials locally.
Import-Module "sqlps" -DisableNameChecking cd sqlas cd "database name" Add-RoleMember -Database "Telecoms Sales" -RoleName "ReportingServices" -M emberName "DOMAIN\UserName"
(It looks like the SSRS default execution account can’t be used implicitly as with sql datasources)