SQL Server PowerShell Overview
SQL Server 2008 introduces support for Windows PowerShell. Windows PowerShell is a powerful scripting shell that lets administrators and developers automate server administration and application deployment. The Windows PowerShell language supports more complex logic than Transact-SQL scripts, giving SQL Server administrators the ability to build robust administration scripts. Windows PowerShell scripts can also be used to administer other Microsoft server products. This gives administrators a common scripting language across servers.
SQL Server provides two Windows PowerShell snap-ins that implement:
A SQL Server provider, which enables a simple navigation mechanism similar to file system paths. You can build paths similar to file system paths, where the drive is associated with a SQL Server management object model, and the nodes are based on the object model classes. You can then use familiar commands such as cd and dir to navigate the paths similar to the way you navigate folders in a command prompt window. You can use other commands, such as ren or del, to perform actions on the nodes in the path.
A set of cmdlets, which are commands used in Windows PowerShell scripts to specify a SQL Server action. The SQL Server cmdlets support actions such as running a sqlcmd script containing Transact-SQL or XQuery statements.
In This Section
Topic |
Description |
---|---|
Lists the locations of information about using SQL Server with Windows PowerShell. Describes how to use Get-Help to get information in the Windows PowerShell environment. |
|
Contains information about the different ways that Windows PowerShell scripts can be run. This includes a new sqlps command prompt utility, integration into SQL Server Management Studio, and SQL Server Agent job steps. |
|
Contains information about the SQL Server provider that supports the ability to navigate a hierarchy of SQL Server objects. |
|
Contains information about the SQL Server cmdlets that specify SQL Server actions. |
|
Contains information about using SQL Server delimited identifiers in Windows PowerShell. |
|
Lists the locations of information describing how to get started using Windows PowerShell. |