Database Reference
In-Depth Information
2.
Launch Windows PowerShell and then manually add the SQL Server PowerShell
provider functionality. Execute the following commands:
Get-PSSnapin -registered
Add-PSSnapin SqlServerProviderSnapin100
Add-PSSnapin SqlServerCmdletSnapin100
3.
For this recipe, let us right-click on SQL Server instance to the Start
PowerShell console:
4.
When we invoke SQL Server PowerShell using SQL provider from SSMS, depending on
what object we right-click to access SQL Server PowerShell, the prompt opens in the
context of that particular object.
The four hierarchies are SQL, SQLPolicy, SQLRegistration, and
DataCollection. In this recipe, we are discussing about SQL
hierarchy, which involves database engine objects.
5.
The previous image shows the path within the console, PS SQLSERVER:\SQL\
DBIA-SSQA\SQL2K8R2U> whereas, when we start the SQL Server PowerShell
console from the command prompt using sqlps.exe , the prompt opens at the root
of the SQL Server provider.
6.
Using SQL Server PowerShell console, many administrative tasks can be performed
such as general tasks to send out e-mails containing a particular report or a result
from a TSQL statement.
 
Search WWH ::




Custom Search