Forum Discussion
PowerShell-SSAS
Two sqlsever instances are installed on the computer. When I use PowerShell to access SQLAS for both instances, I can query the paths for both instances, but only for Default.
Does PowerShell access only the default instance?
- AlikocIron Contributor
Hello,
Here are a few things you could try
Verify the SQL Server Instances , for example Use PowerShell to list all SQL Server instances on the machine to ensure that both "DEFAULT" and "SQLAS" are registered correctly.
Get-SqlInstance
Connect Using Full Instance Names; If you’re able to connect to "SQLAS" using its full name or server\instance format, try specifying it directly instead of relying on the assumed paths.
Ensure you’re using the appropriate SQL Server module (like SqlServer or SQLPS) and that it supports multi-instance connections. You might want to explicitly set up the connection to the instance in your script rather than navigating paths.
You could also script out the connections using SMO in PowerShell, as it often provides more flexibility for multi-instance environments.
Best Regards,
Ali Koc