The initially PowerShell integrated with SQL Server 2008 as mini-shell with limited options.
Now the Microsoft launched fully functional PowerShell with SQL Server 2012.
The PowerShell is a powerful scripting shell for administrators and developers to automate different tasks of the SQL Server.
PowerShell is becoming more central to the Windows management model and can provide a common framework for managing all the different servers in a Microsoft Windows infrastructure.
PowerShell can manage Windows, SQL Server, SharePoint and others.
PowerShell is one of the good alternatives to manage SQL Server and it is one kind of bridge between SQL Server and Operating System(OS) to accessing and managing system and network resources.
Unlike T-SQL, PowerShell can access resources that are outside of SQL Server.
PowerShell is also capable to use advanced .NET functions which are not available in T-SQL.
PowerShell can also run T-SQL queries using Invoke-Sqlcmd.
But the syntax and script coding of the PowerShell is very difficult to learn for non-developers.
The sqlps is an additional module to configure Windows PowerShell for the SQL Server.
It supports different types of cmdlets including like: Invoke-Sqlcmd, Add-SqlAvailabilitiyDatabase, Join-SqlAvailabilityGroup, Backup-SqlDatabase, Restore-SqlDatabase.
How to open PowerShell from the SSMS?
You can directly open windows PowerShell from the SSMS.
You can right click on any object and open the PowerShell window and it opens directly under the Windows SQL Server disk location.
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.