These days I decided to play around with SQL Server 2014, and of course, one of the first things I went to check was the PowerShell Host to see if there was any difference in SQL Server 2012.
I remembered a script from a good friend and PowerShell Jedi Shay Levy in which he compares , at the time that PowerShell V3 was to be released, the differences between PowerShell V2 and V3. I used this same script with some simple changes, and you can found the original version in :
1 Test : The Version of the host :
SQL Server 2012 : 2.0
SQL Server 2014 CTP1 : 2.0
PowerShell version is the same, of PowerShell 2.0
2 Test : Compare to check new/removed/changed cmdlets / parameters (using the changed version of the Shay’s script) :
SQLPS module :
As we can see :
Backup-Sqldatabase was changed, added 2 new parameters : BackupContainer and Sqlcredential
Invoke-Sqlcmd was changed added a new parameter : IncludeSqlUserErrors
Restore-Sqldatabase was changed added a new parameter SqlCredential
Added 4 new cmdlets (to support the new parameter Sqlcredential) : Get-SqlCredential,New-SqlCredential,Remove-SqlCredential and Set-SqlCredential
SQLASCmdlets : Nothing changed
I did the test directly in the host of the PowerShell in SQL Server. In my box I am using Windows 2012 R2 Preview, with PowerShell 4.0 .
A cool stuff is that you may have benefits of the new common parameter added at the PowerShell V4.0 , PipelineVariable, if you import the module SQLPS in the PowerShell host it self.
Shay pointed me this very ultra F Mothe…parameter and Keith is explaining in here :
If you do that and want to run your script scheduled in the SQL Agent, just run as cmd and call Powershell 🙂
That is guys. Remembering that is the CTP1 and some things still can be changed.