The following table contains a list of all of the CmdLets and Functions released with SQLPS over the last few versions and highlights the evolution of the PowerShell support in SQL Server.
NOTE: This list was compiled from executing "Get-Command -Module SQLPS" (or similar) on the relevant versions.
In addition to this the SQLPS.exe Utility was introducted in SQL 2008 and is still available however it has been marked for depreciation in future releases. I have always recommended PowerShell peeps to use SQLPS Module which was introducted in SQL 2012 and still maintained today. The main reason that this has been my recommendation is that the SQLPS utility loads a PowerShell v2 shell and because I often use cmdlets other than just the SQL ones in my scripts I find it more efficient to develop for the latest release.
SQL 2008 R2 | SQL 2012 | SQL 2014 |
SQLSERVER: | SQLSERVER: | SQLSERVER: |
Decode-SqlName | Add-SqlAvailabilityDatabase | Add-SqlAvailabilityDatabase |
Encode-SqlName | Add-SqlAvailabilityGroupListenerStaticIp | Add-SqlAvailabilityGroupListenerStaticIp |
Invoke-Sqlcmd | Backup-SqlDatabase | Add-SqlFirewallRule |
Convert-UrnToPath | Backup-SqlDatabase | |
Decode-SqlName | Convert-UrnToPath | |
Disable-SqlAlwaysOn | Decode-SqlName | |
Enable-SqlAlwaysOn | Disable-SqlAlwaysOn | |
Encode-SqlName | Enable-SqlAlwaysOn | |
Get-SqlCredential | Encode-SqlName | |
Invoke-PolicyEvaluation | Get-SqlCredential | |
Invoke-Sqlcmd | Get-SqlDatabase | |
Join-SqlAvailabilityGroup | Get-SqlInstance | |
New-SqlAvailabilityGroup | Get-SqlSmartAdmin | |
New-SqlAvailabilityGroupListener | Invoke-PolicyEvaluation | |
New-SqlAvailabilityReplica | Invoke-Sqlcmd | |
New-SqlCredential | Join-SqlAvailabilityGroup | |
New-SqlHADREndpoint | New-SqlAvailabilityGroup | |
Remove-SqlAvailabilityDatabase | New-SqlAvailabilityGroupListener | |
Remove-SqlAvailabilityGroup | New-SqlAvailabilityReplica | |
Remove-SqlAvailabilityReplica | New-SqlBackupEncryptionOption | |
Remove-SqlCredential | New-SqlCredential | |
Restore-SqlDatabase | New-SqlHADREndpoint | |
Resume-SqlAvailabilityDatabase | Remove-SqlAvailabilityDatabase | |
Set-SqlAvailabilityGroup | Remove-SqlAvailabilityGroup | |
Set-SqlAvailabilityGroupListener | Remove-SqlAvailabilityReplica | |
Set-SqlAvailabilityReplica | Remove-SqlCredential | |
Set-SqlCredential | Remove-SqlFirewallRule | |
Set-SqlHADREndpoint | Restore-SqlDatabase | |
Suspend-SqlAvailabilityDatabase | Resume-SqlAvailabilityDatabase | |
Switch-SqlAvailabilityGroup | Set-SqlAuthenticationMode | |
Test-SqlAvailabilityGroup | Set-SqlAvailabilityGroup | |
Test-SqlAvailabilityReplica | Set-SqlAvailabilityGroupListener | |
Test-SqlDatabaseReplicaState | Set-SqlAvailabilityReplica | |
Set-SqlCredential | ||
Set-SqlHADREndpoint | ||
Set-SqlNetworkConfiguration | ||
Set-SqlSmartAdmin | ||
Start-SqlInstance | ||
Stop-SqlInstance | ||
Suspend-SqlAvailabilityDatabase | ||
Switch-SqlAvailabilityGroup | ||
Test-SqlAvailabilityGroup | ||
Test-SqlAvailabilityReplica | ||
Test-SqlDatabaseReplicaState | ||
Test-SqlSmartAdmin |
NOTE: This list was compiled from executing "Get-Command -Module SQLPS" (or similar) on the relevant versions.
In addition to this the SQLPS.exe Utility was introducted in SQL 2008 and is still available however it has been marked for depreciation in future releases. I have always recommended PowerShell peeps to use SQLPS Module which was introducted in SQL 2012 and still maintained today. The main reason that this has been my recommendation is that the SQLPS utility loads a PowerShell v2 shell and because I often use cmdlets other than just the SQL ones in my scripts I find it more efficient to develop for the latest release.
No comments:
Post a Comment