Monthly Archive


SQL Server PowerShell provider

I have been looking at PowerShell in SQL Server again recently as I'm working on chapters involving PowerShell and SQL Server for a couple of books. I had had a vague understanding that the PowerShell provider could access remote machines but had not really followed up on it. PowerShell is getting to be such as big topic considering the number of products it is built into.

When you open up the SQL Server mini-shell and perform

cd sqlserver:\sql


to step into the database engine and display the contents all you will see is  the current machine.  You can access remote machines by typing

cd server_name

and you will be connected to them.  This also works in the management Studio in that you can right click on a remote registered server and point the provider to that particular server. In effect sqlps has its own remoting system.

Thanks to Dan for pointing that out to me.


Share this post :


Technorati Tags: PowerShell,SQL Server,SMO

Leave a Reply