Powershell - 无法识别术语 'New-SqlColumnEncryptionKey' - 尝试创建列加密密钥

Powershell - The term 'New-SqlColumnEncryptionKey' is not recognized - trying to create Column Encryption Key

我正在使用 Powershell 7.0.3。 连接到 azure(通过 connect-AzAccount)后,我可以列出我的列主密钥:

Get-SqlColumnMasterKey -InputObject $database

Name
----
MYDB_CMK
MYDB_CMK2

尝试创建列加密密钥..

New-SqlColumnEncryptionKey -Name "MYDB_CEK" -InputObject $database -ColumnMasterKey "MYDB_CMK"

我收到以下错误:

New-SqlColumnEncryptionKey: The term 'New-SqlColumnEncryptionKey' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

据我所知,命令 Get-SqlColumnMasterKeyNew-SqlColumnEncryptionKey 应该在同一个模块中,通过

Import-Module "SqlServer" 

我错过了什么?

是的,它是 SqlServer 模块的一部分,但仅在 Powershell 5 中受支持: