Saturday, March 28, 2009

PowerShell for SQL Server 2000+ - Chad Miller’s SQL Server PowerShell Extensions v1.5 released, with 104 functions, 2 cmdlets and 12 scripts

Chad Miller's Blog - SQLPSX 1.5 Release

“I completed Release 1.5 of SQLPSX which adds 31 new functions for working with database maintenance (CHECKDB, Index rebuilds, backup and restore) as well as login, user, role and permission management. With this release there are now 104 total functions, 2 cmdlets and 12 scripts around SMO, Agent, RMO, and SSIS.

Here's a few examples working with database maintenance functions:

#Get a database object
$db = get-sqldatabase 'Z002\SqlExpress' pubs

#Run a checkdatabse
invoke-sqldatabasecheck $db
$db invoke-sqldatabasecheck

SQLPSX 1.5 marks what I consider the first feature complete release. I believe the most common database administration tasks can be accomplished using the 107 functions/cmdlets provided in SQLPSX. If you feel something is missing please post to the discussion forum.

With Release 1.5 complete, I'm starting work on the 1.6 Release which will include two enhancements. …”

CodePlex - SQL Server PowerShell Extensions

“Project Description
The primary goal of SQL Server PowerShell Extensions (SQLPSX) is to provide intuitive functions around the SMO objects which are backward compatible with SQL 2000. A secondary goal is to provide an application which reports flatten/effective security settings for logins, users, roles, and permissions.

Installation

SQLPSX consists of a library file of PowerShell functions and several PowerShell scripts, if you've downloaded the files through Internet Explorer you'll need to unblock all Powershell files after downloading by right-clicking each PowerShell file in Windows Explorer and clicking the Unblock button. Using SQLPSX requires you've installed the SMO libraries which are included with SQL Server Management Studio.

…”

SQL Server PowerShell Extensions - 1.5 Production

“Released: Mar 28 2009

Updated: Mar 28 2009 by cmille19

Dev status: Stable

Downloads & Files

SQLPSX_1.5.zip
source code, 640K, uploaded Today

readme.txt
documentation, 22K, uploaded Today

screenshots_SQLPSX.docx
documentation, 1315K, uploaded Today…

Release Notes

Release 1.5 introduces 31 new functions for working with database maintenance, backup/restore, logins, roles, users and permission management. The release also includes two compiled cmdlets with help files for parsing and formatting of SQL Server scripts. SQLPSX consists of 105 total functions, 2 cmdlets and 12 scripts for working with SMO, Agent, RMO, SSIS and SQL script files. In addition an optional component of a backend database and SQL Server Reporting Services 2008 reports are provided. See readme file for details.”

SQL Server Central - SQL Server PowerShell Extensions (SQLPSX) Part 1

“Solving a SQL Server administration task with PowerShell scripts often requires the use of SQL Server Management Objects (SMO). For a DBA new to PowerShell scripting this presents a doubly step learn curve first you must learn the PowerShell language and then you must learn the SMO objects necessary to accomplish your task. There are many wonderful books and tutorials available for learning PowerShell. A good starting point is the Windows PowerShell site. For learning SMO objects, the goal of the CodePlex project SQL Server PowerShell Extensions (SQLPSX) is to provide intuitive PowerShell functions around SMO objects to make working with SMO from PowerShell easier. This article is not intended to be an introduction to PowerShell, but rather an introduction to SQLPSX. A basic understanding of PowerShell is helpful, but not necessary to follow the examples.

…”

SQL Server Central - SQL Server PowerShell Extensions (SQLPSX) Part 2

“Part 1 of SQL Server PowerShell Extensions (SQLPSX) demonstrated how to install the and use the SQLPSX PowerShell functions. In this second article we will create a database to store the output of the functions, load the data and look at the SQL Server Reporting Services (SSRS) reports and queries provided with SQLPSX to analyze SQL Server security information.

…”

What better way to spend a Saturday than playing with PowerShell and Chad’s SQL Server Extensions? ;)

(via Richard Siddaway's Blog - SQLPSX 1.5)

Related Past Post XRef:
NodeXL, PowerShell and building a visual SQL Dependency Graph

No comments: