Click to Rate and Give Feedback
Community Content
In this section
Statistics Annotations (1)
SQL Server 2008 Books Online (October 2008)
SQL Server PowerShell Overview

SQL Server 2008 introduces support for Microsoft PowerShell. PowerShell is a powerful scripting shell that lets administrators and developers automate server administration and application deployment. The PowerShell language supports more complex logic than Transact-SQL scripts, giving SQL Server administrators the ability to build robust administration scripts. 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 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 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.
Cc281954.note(en-us,SQL.100).gifNote:
SQL Server 2008 only supports PowerShell scripts for the technologies supported by the SQL Server Management Objects (SMO): the Database Engine and Service Broker.

Topic Description

SQL Server PowerShell Help

Lists the locations of information about using SQL Server with PowerShell. Describes how to use Get-Help to get information in the PowerShell environment.

Running SQL Server PowerShell

Contains information about the different ways that SQL Server 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.

Using the SQL Server PowerShell Provider

Contains information about the SQL Server PowerShell provider that supports the ability to navigate a hierarchy of SQL Server objects.

Using the SQL Server cmdlets

Contains information about the SQL Server PowerShell cmdlets that specify SQL Server actions.

Using SQL Server Identifiers in PowerShell

Contains information about using SQL Server delimited identifiers in PowerShell.

Learning PowerShell

Lists the locations of information describing how to get started using PowerShell.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Pre-written Powershell scripts for SQL Server Management      Idera ... Thomas Lee   |   Edit   |  

Idera has posted 19 pre-written PowerShell scripts that will help you use PowerShell for basic SQL Server management tasks such as backup, start & stop services, find failed jobs, and more.

The scripts are available free and are posted on the PowerShell community site, www.powershell.com. The scripts can be found at: http://powershell.com/cs/media/g/sql-server/default.aspx

Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker