I completed
Release 1.6 of SQLPSX which adds support for SQL Authentication and addresses several issues. SQLPSX consists of 106 functions, 2 cmdlets and 12 scripts for working with SMO, Agent, RMO, SSIS and SQL script files.
Here's an example of using SQL Authentication:
$server = Get-SqlServer 'Z002\SQL2K8' 'sa' 'mypassword'
Because Get-SqlServer, Get-AgentJobServer, and Get-ReplServer support either Windows or SQL Authentication you can pass a server object to the additional functions. Here's an example of getting databases from the server variable creating above:
Get-SqlDatabase $server | Select name
Many of the functions support shortcuts when using Windows authentication. Because Windows authentication is used we do not have to first get a reference to a server object. manually Here's the same example getting databases using Windows authentication:
Get-SqlDatabase 'Z002\SQL2K8'
Other than the addition of SQL authentication support, SQLPSX 1.6 is largely a maintenance release. I've replaced calls to WMIC with Get-WmiObject and addressed issues documented in the
Issue Tracker. I've also incorporated the
error handling technique Allen White provided into several functions in order to provide better error reporting. I had hoped to have a provider for SSIS completed, however I ran into a few issues with
weak support of functionality in the SSIS API. If the SQL product team doesn't include an SSIS provider in SQL Server 2008 R2, I'll look at creating one then.
With Release 1.6 complete I'm planning on the next release, 2.0, to re-implement the V1 functions as advanced functions in Powershell V2.