PowerShell的第一步。我无法从AWS安装的模块中删除/卸载AWSPowerShell
模块。Get-Module -Name AWSPowerShell,AWSPowerShell.NetCore,AWS.Tools.Common -ListAvailable
如下所示:
Directory: C:\Users\user\Documents\PowerShell\Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Binary 4.1.14.0 AWS.Tools.Common Core,Desk {Clear-AWSHistory, Set-AWSHistoryConfiguration, Initialize-AWSDefaultConfi…
Directory: C:\Program Files (x86)\AWS Tools\PowerShell
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Binary 3.3.509.0 AWSPowerShell Desk
当我尝试通过Uninstall-Module -Name AWSPowerShell
卸载它时,我收到错误:
Uninstall-Package: C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1:12733
Line |
12733 | … $null = PackageManagement\Uninstall-Package @PSBoundParameters
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| No match was found for the specified search criteria and module names 'AWSPowerShell'.
问题--我怎样才能摆脱这个问题?
2条答案
按热度按时间g52tjvyc1#
您只需将其删除即可。如果你想通过PowerShell做到这一点,你可以这样做:
wecizke32#
要安装
AWSPowerShell
模块,需要将文件夹放入之后,您可以执行以下命令来安装模块:
现在,应该在客户端上安装
AWSPowerShell
。如果要删除
AWSPowerShell
,则需要执行以下命令:删除模块后,您可以删除该文件夹:
有关这些命令的更多信息,请访问Microsoft Wiki:
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/import-module?view=powershell-7.2
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/remove-module?view=powershell-7.2