Skip to content

What's new in v22

Matteo Taveggia edited this page May 24, 2023 · 13 revisions

Relevant changes in v22 (compared to v21):

  • The following cmdlets were removed starting in version 22.0.20:

    • Save-SqlMigrationReport: The cmdlet did not seem very useful and had the disadvantage of pulling in a ton of dependencies on packaged not available on nuget.org. I doubt it will ever come back.

    • Add-SqlFirewallRule - cmdlet ceased to work several years ago

    • Remove-SqlFirewallRule - cmdlet ceased to work several years ago

    • Set-SqlAuthenticationMode - cmdlet ceased to work several years ago

    • Set-SqlNetworkConfiguration - cmdlet ceased to work several years ago

    • Start-SqlInstance - cmdlet ceased to work several years ago

    • Stop-SqlInstance - cmdlet ceased to work several years ago

  • PSDrive roots permanently removed:

    • SQLSERVER:\DAC: it had been broken for several years.
    • SQLSERVER:\Utility: ancient/obsolete UCP funcionality. Not sure it was actually working.
  • PSDrive roots removed (may come back, if there's interest)

    • SQLSERVER:\SSIS: required one or more DLLs that are not available on nuget.org (and not even available at the time v22.0.20 went out). Would be interesting to see if people actually miss it.
  • More cmdlets ported over to PS7:

  • Updated cmdlets

  • Cmdlets only availale in PS5 (still):

    • Test-SqlAvailabilityGroup
    • Test-SqlAvailabilityReplica
    • Test-SqlDatabaseReplicaState They would require porting Microsoft.SqlServer.Management.HadrDmf to net6.0, which is not done available yet.

New in v22.0.30

  • Migration to Microsoft.Data.SqlClient 4.1.0
  • Refreshed Sql Assessment cmdlets
  • Added missing Enable-SqlAlwaysOn / Disable-SqlAlwaysOn on PS7

New in v22.0.49

  • Migration to Microsoft.Data.SqlClient 5.0.1. See #12
    • In Invoke-Sqlcmd the old -EncryptConnection is essentially always (implicitly set) by the Microsoft.Data.SqlClient (the driver) for better security. If you trust the connection, or you want to emulate the behavior of Invoke-Sqlcmd in v21, then you need to pass the new -TrustServerCertificate.
    • Invoke-Sqlcmd accepts a new parameter -HostNameInCertificate which maps to the same parameter in the Microsoft.Data.SqlClient connection string. See https://learn.microsoft.com/en-us/sql/connect/ado-net/connection-string-syntax?view=sql-server-ver16#hostnameincertificate for details.
    • Invoke-Sqlcmd accepts a new parameter -Encrypt which maps to the Encrypt property in the Microsoft.Data.SqlClient connection string.
  • Always Encrypted cmdlets. As of v22, all the AE cmdlets are available on PS7. There's been a lot of improvements around these. This blog has more info on that.
  • Removal of the dependency on Microsoft.SqlServer.BatchParser.dll (native 64bit dll); now both PS5.x and PS7.x Invoke-Sqlcmd share the same dependency on Microsoft.SqlTools.ManagedBatchParser.dll (fully managed). Please, report possible incompatibilities that may be found.

New in v22.0.59

  • v22.0 GA release (4/4/2023)
  • Fixed Invoke-SqlNotebook cmdlet to property support -HostNameInCertificate, -TrustServerCertificate, and -Encrypt
  • More more and more cmdlets aware of -HostNameInCertificate, -TrustServerCertificate, -Encrypt, and -AccessToken.
  • Invoke-Sqlcmd: fixed issue in -DisableVariables (not working in some cases); made -Variables accept a dictionary/hashtable for better usability.
  • Analysis Services cmdlets available on PS7 in a non-preview release of the module.
Clone this wiki locally