首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >powershell核心错误:未加载指定模块'RPC-Client‘

powershell核心错误:未加载指定模块'RPC-Client‘
EN

Stack Overflow用户
提问于 2020-11-15 22:03:52
回答 1查看 110关注 0票数 1

如何查找有关xml-rpc for powershell的更多信息

代码语言:javascript
复制
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:~$ 

在运行Update-help时,我希望能够找到更多信息。

也许添加一个模块

我试过:

代码语言:javascript
复制
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核心中?

我试着安装如下:

代码语言:javascript
复制
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> 

但也许需要先“下载”吗?某物喜欢

代码语言:javascript
复制
sudo powershell -Command {Install-Module -Name AzureRM.Netcore}

或者至少沿着这条线。

EN

回答 1

Stack Overflow用户

发布于 2020-11-15 22:26:31

来自mklement0:

代码语言:javascript
复制
PS /home/nicholas/powershell> 
PS /home/nicholas/powershell> Install-Module XmlRpc

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by 
running the Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): Y
PS /home/nicholas/powershell>         
PS /home/nicholas/powershell> 
PS /home/nicholas/powershell> Get-Help xmlrpc

名称类别模块 概要 … 转换到-XmlRpcType函数XmlRpc … 发送-XmlRpcRequest函数XmlRpc …

代码语言:javascript
复制
                                                                                                                                                                                   PS /home/nicholas/powershell> 

看上去很有希望。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64850281

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档