powershell核心错误:未加载指定的模块'RPC-Client' [英] powershell core error: The specified module 'RPC-Client' was not loaded
问题描述
如何找到有关 powershell
的 xml-rpc
的更多信息?
How do I find out more information about xml-rpc
for powershell
?
PS /home/nicholas>
PS /home/nicholas> Update-Help
PS /home/nicholas>
PS /home/nicholas> Get-Help Send-XmlRpcRequest
Get-Help: Get-Help could not find Send-XmlRpcRequest in a help file in this session. To download updated help topics type: "Update-Help". To get help online, search for the help topic in the TechNet library at https://go.microsoft.com/fwlink/?LinkID=107116. PS /home/nicholas> PS /home/nicholas> Get-Host | Select-Object Version Version -------
7.1.0
PS /home/nicholas>
PS /home/nicholas> exit
nicholas@mordor:~$
nicholas@mordor:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
nicholas@mordor:~$
As I ran Update-help
I'd expect to find more information.
也许添加一个模块?
我尝试过:
nicholas@mordor:~/powershell$
nicholas@mordor:~/powershell$ pwsh hello.ps1
Import-Module: /home/nicholas/powershell/hello.ps1:1
Line |
1 | import-module RPC-Client
| ~~~~~~~~~~~~~~~~~~~~~~~~
| The specified module 'RPC-Client' was not loaded because no valid module file was found in any module directory.
hello
nicholas@mordor:~/powershell$
nicholas@mordor:~/powershell$ cat hello.ps1
import-module RPC-Client
"hello"
nicholas@mordor:~/powershell$
如何将其添加到 powershell
内核中?
How do I add that into powershell
core?
我尝试将其安装为:
PS /home/nicholas/powershell>
PS /home/nicholas/powershell> Find-Module -Name Xml
Version Name Repository Description
------- ---- ---------- -----------
7.0 Xml PSGallery A module providing converters for HTML to XML, vario…
PS /home/nicholas/powershell>
PS /home/nicholas/powershell> Find-Module -Name Rpc
Find-Package: /snap/powershell/149/opt/powershell/Modules/PowerShellGet/PSModule.psm1:8879
Line |
8879 | PackageManagement\Find-Package @PSBoundParameters | Microsoft …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| No match was found for the specified search criteria and module name 'Rpc'. Try Get-PSRepository to see all
| available registered module repositories.
PS /home/nicholas/powershell>
PS /home/nicholas/powershell> Find-Module -Name foo
Find-Package: /snap/powershell/149/opt/powershell/Modules/PowerShellGet/PSModule.psm1:8879
Line |
8879 | PackageManagement\Find-Package @PSBoundParameters | Microsoft …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| No match was found for the specified search criteria and module name 'foo'. Try Get-PSRepository to see all
| available registered module repositories.
PS /home/nicholas/powershell> Find-Module -Name Rpc-Client
Find-Package: /snap/powershell/149/opt/powershell/Modules/PowerShellGet/PSModule.psm1:8879
Line |
8879 | PackageManagement\Find-Package @PSBoundParameters | Microsoft …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| No match was found for the specified search criteria and module name 'Rpc-Client'. Try Get-PSRepository to see all
| available registered module repositories.
PS /home/nicholas/powershell>
,但可能需要下载"首先吗?喜欢:
but perhaps need to "download" it first? Something like:
sudo powershell -Command {Install-Module -Name AzureRM.Netcore}
或至少沿着这些路线.
推荐答案
没有 XML-PowerShell中内置的RPC 功能.
因此,提供此类功能需要第三方代码.
Providing such functionality therefore requires third-party code.
在您的情况下,您的脚本似乎需要 XmlRpc
模块,可从PowerShell库中此处(这意味着您可以使用 Install-Module XmlRpc
安装).
In your case, it seems your script requires the XmlRpc
module, available from the PowerShell Gallery here (which means you can install it with Install-Module XmlRpc
).
但是,此模块最近一次更新是在5年前,它早于PowerShell的跨平台版本 PowerShell(核心),因此您必须了解一下它是否可以在类似Unix的平台(例如Ubuntu)上运行.
However, this module was last updated more than 5 years ago, predating PowerShell's cross-platform edition, PowerShell (Core), so you'll have to find out yourself if it works on a Unix-like platform such as Ubuntu.
这篇关于powershell核心错误:未加载指定的模块'RPC-Client'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!