Powershell 模块 DBATools 命令给出错误

Powershell module DBATools command giving error

我现在收到以下错误:

PS C:\WINDOWS\system32> Test-DBADbCompatibility -SqlInstance localhost -Database EfficaDB

Cannot convert value "Version150" to type 
"Microsoft.SqlServer.Management.Smo.CompatibilityLevel". Error: "Unable to match the 
 identifier name Version150 to a valid enumerator name. 
Specify one of the following enumerator names and try again:Version60, Version65, 
Version70, Version80, Version90, Version100, Version110, Version120, Version130, Version140"
At C:\Program Files\WindowsPowerShell\Modules\dbatools.1.40\allcommands.ps1:77485 char:93
+ ... r.Management.Smo.CompatibilityLevel]"Version$($server.VersionMajor)0"+
~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidArgument: (:) [], RuntimeException
+ FullyQualifiedErrorId : SubstringDisambiguationEnumParseThrewAnException

我已经在服务器中安装了最新版本的 DBATools。

我在 PowerShell 脚本文件的开头添加了以下语句,解决了错误:

import-module DBATools
import-module sqlserver