![](/img/trans.png)
[英]Import-Module : The specified module 'SqlServer' was not loaded because no valid module file was found in any module directory
[英]PowerShell 4 - Import-Module : The specified module 'SQLPS' was not loaded because no valid module file was found in any module directory
以前使用PowerShell 3.升級到PowerShell 4並在面臨錯誤時將其卸載。 Import-Module : The specified module 'SQLPS' was not loaded because no valid module file was found in any module directory.
但是所有與SQL相關的東西都沒有錯誤。 PowerShell控制台中出現此錯誤的根本原因是什么?
聽起來你需要手動更新模塊路徑。
檢查計算機上是否存在此目錄。
C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules\SQLPS
[固定]
如果它然后運行
$env:PSModulePath = $env:PSModulePath + ";C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules"
然后檢查SQLPS模塊是否在可用模塊列表中
get-module -listavailable
它只是正常的錯誤。
Step: 1 - We have to check the Path[[ C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules\SQLPS]] is available in our machine.
If yes, follow step 2
Step: 2. Just copy the [SQLPS] folder from the above link
Step: 3. Paste the same in [[C:\Windows\system32\WindowsPowerShell\v1.0\Modules\\\
Step: 4 Its been occur due to unavailability of the SQLPS
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.