Short post this evening…

Just in case anyone else flails around looking for this feature, its right under your nose. When you use the PowerShell SQL Server 2008 provider, you have visibility to a single, local machine (and all its SQL Server instances you can access with integrated security) by default. To get access to multiple machines using the provider, simply reference a SQL provider path that contains that machine name. If the (Windows) principal has access to the other machine's SQL Server instance, it will open a connection using Windows auth.

For example, say that I'm on a machine named zmv20. I have access to machine zmv21's SQL Server instance as well.



>dir zmv21  <—- makes a connection to zmv21

Instance Name  (on zmv21)

>dir           <—- now you can "see" zmv21 too


Using the test-path cmdlet also works.

>test-path SQLSERVER:\SQL\zmv22  <—- can I login to this machine too?

But bear in mind that this is subject to a connection timeout lag. The error message indicates that its first using WMI to obtain the machine connection.

Of course, all this is doc'd in SQL Server Books Online. Where I missed it a few times…I was looking for the equivalent of a "connect" command. You don't need one.