如何安装 DBATools

如何安装 DBATools

我想在我的桌面上安装 DBAtools 实用程序。我希望它能帮助我进一步探索 SQL。

我在这个位置找到了对它的引用https://dbatools.io/commands/

我将 dbatools.0.9.475.nupkg 包下载到我的桌​​面。

不幸的是,我的电脑没有管理员权限。我尝试使用 Power Shell 并按照建议运行此命令:

PS W:\Software\dbatools> Install-Module -Name dbatools
Install-Module : The term 'Install-Module' 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.
At line:1 char:1
+ Install-Module -Name dbatools
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Install-Module:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

有人能建议一种打开 .nupkg 的解决方法,但不知道怎么做吗?也许 dbatools 除了 .nupkg 还有其他格式?没有管理员权限,我做不了什么。有什么建议吗?谢谢

答案1

  1. 找到您的下载位置
  2. 左键单击该dbatools文件夹或单击您保存该文件夹的任何名称。
  3. 左键单击版本文件夹。(我的当前版本是 1.0.9)
  4. 打开安装 PowerShell 代码。
  5. Shift+a全选并复制。
  6. 以管理员权限打开 PowerShell。
  7. 粘贴并运行。

相关内容