简体   繁体   English

PowerShell 模块手动安装。 在帮助下找到但在执行时无法识别的 cmdlet

[英]PowerShell module installed manually. cmdlets found with help but not recognized when executed

I have a machine i would like to install a module on, specifically SwisPowerShell for working with SolarWinds.我有一台机器,我想在上面安装一个模块,特别是用于与 SolarWinds 一起工作的 SwisPowerShell。 Inte.net is disabled on it so i cant use install-module, so i manually downloaded the.nupkg from another machine and went through the steps of unpacking the files into the correct folders. Inte.net 在上面被禁用,所以我不能使用安装模块,所以我从另一台机器手动下载了.nupkg 并完成了将文件解压缩到正确文件夹中的步骤。 https://learn.microsoft.com/en-us/powershell/scripting/gallery/how-to/working-with-packages/manual-download?view=powershell-7.2 . https://learn.microsoft.com/en-us/powershell/scripting/gallery/how-to/working-with-packages/manual-download?view=powershell-7.2 all the.dll files and the windows powershell datafile i have tried in both directories "C:\Program Files\WindowsPowerShell\Modules\SwisPowerShell\3.1.0.343" and "C:\Users\username\Documents\WindowsPowerShell\Modules\SwisPowerShell\3.1.0.343".我在两个目录“C:\Program Files\WindowsPowerShell\Modules\SwisPowerShell\3.1.0.343”和“C:\Users\username\Documents\WindowsPowerShell\Modules\SwisPowerShell\ 3.1.0.343”。 Importing the module with "import-module -name SwisPowerShell -Global -force -Verbose" shows that everything loads correctly, but then running "get-module SwisPowerShell -Verbose" returns nothing.使用“import-module -name SwisPowerShell -Global -force -Verbose”导入模块表明所有内容都正确加载,但随后运行“get-module SwisPowerShell -Verbose”不会返回任何结果。 even loading each dll individually with "add-type -path "C:...\somefile.dll" shows nothing. running "get-module -ListAvailable" shows the module in both (or either) directories as they should be. using "get-help cmdletname" and "get-command cmdletname" shows the correct cmdlet definitions. trying to run any of the cmdlets returns "The term 'connect-swis' is not recognized as the name of a cmdlet, function... yada yadda" for all of the cmdlets. its like powershell sees the files but refuses to use them. Am i missing a step that tells powershell that this is a valid module to use? could it be blocked somehow? what extra steps does install-module do that a manual install does not that i could try?甚至使用“add-type -path”C:...\somefile.dll“单独加载每个 dll 也没有任何显示。运行”get-module -ListAvailable“显示两个(或任一)目录中的模块,因为它们应该是。使用“get-help cmdletname”和“get-command cmdletname”显示了正确的 cmdlet 定义。尝试运行任何 cmdlet 返回“术语‘connect-swis’未被识别为 cmdlet 的名称,function ... yada yadda”用于所有 cmdlet。它像 powershell 一样看到文件但拒绝使用它们。我是否错过了一个步骤,告诉 powershell 这是一个有效的模块?它可以以某种方式被阻止吗?安装模块有哪些额外的步骤手动安装不是我可以尝试的吗?

Try running process monitor while installing on another machine.在另一台机器上安装时尝试运行进程监视器。 You might find out it's doing some registry changes too.您可能会发现它也在进行一些注册表更改。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Powershell的首次运行中无法识别cmdlet - cmdlets not recognized on the first run in powershell 在函数中执行时,powershell 会话连接 cmdlet 不起作用 - powershell session connection cmdlets not work when executed in function 调用 Azure Powershell cmdlet 时出现“未在上下文中找到订阅”错误 - "No subscription found in the context" error when invoking Azure Powershell cmdlets Powershell二进制模块未找到但已安装 - Powershell Binary Module not found but installed Powershell 2.0:从脚本运行远程会话与手动输入时获得不同的结果。 有什么不同? - Powershell 2.0: Getting different results when running a remote session from a script vs typing it in manually. What's the difference? PowerShell安装其他工具并使用已安装的cmdlet - PowerShell Installing additional tools and use cmdlets installed 如何在powershell中列出所有已安装、可运行的cmdlet? - How to list all installed, runnable cmdlets in powershell? 尽管安装了正确的模块,但无法识别 Powershell cmdlet - Powershell cmdlet is not recognized despite having the correct module installed Azure Powershell cmdlet-找不到请求的值“启用” - Azure Powershell cmdlets - Requested value 'enable' was not found 当我在本地主机上创建 RunSpace 而不提供 runspaceconnectioninfo 时,某些 PowerShell 模块(集群 cmdlet)不会被加载 - Some of the PowerShell module (Cluster cmdlets) does not get loaded when I create RunSpace on a localhost without providing runspaceconnectioninfo
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM