In the previous article, I have shared basic detail about the working with the Windows PowerShell for the SQL Server.
Using sqlps PowerShell provider, you can easily navigate all files of SQL Server Instance like any other file system.
When Database Administrator requires to navigate or search different objects of a Database, PowerShell is much faster than T-SQL.
At single window DBA can navigate all different objects and file of a Database Server and it saves the time of Database Administrator to write a multiple T-SQL for accessing database instance information.
First start, PowerShell by right clicking on database in SSMS.
In that root path, you can execute [dir] command to get a list of all SQL Server Folders.
Using [cd], you can select any folder like below, I have selected Databases folder.
Execute [dir] for Databases.
Using [cd..], you can go back to a particular folder and can select a new folder.
In below example, I have selected Logins folder.
You can easily get all the available Logins by execution [dir] on that folder.
Another example is to list out all tables of a particular database.
select Databases -> Database -> Tables.
Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.
If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.
I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.