Mac*_*iej 4 powershell amazon-web-services aws-powershell
Powershell 中的第一步。我无法AWSPowerShell 从 AWS 安装的模块中删除/卸载模块。\nGet-Module -Name AWSPowerShell,AWSPowerShell.NetCore,AWS.Tools.Common -ListAvailable显示如下:
Directory: C:\\Users\\user\\Documents\\PowerShell\\Modules\n\nModuleType Version PreRelease Name PSEdition ExportedCommands\n---------- ------- ---------- ---- --------- ----------------\nBinary 4.1.14.0 AWS.Tools.Common Core,Desk {Clear-AWSHistory, Set-AWSHistoryConfiguration, Initialize-AWSDefaultConfi\xe2\x80\xa6\n\n Directory: C:\\Program Files (x86)\\AWS Tools\\PowerShell\n\nModuleType Version PreRelease Name PSEdition ExportedCommands\n---------- ------- ---------- ---- --------- ----------------\nBinary 3.3.509.0 AWSPowerShell Desk\nRun Code Online (Sandbox Code Playgroud)\n我试图通过以下方式卸载它,但Uninstall-Module -Name AWSPowerShell出现错误:
Uninstall-Package: C:\\program files\\powershell\\7\\Modules\\PowerShellGet\\PSModule.psm1:12733\n Line |\n12733 | \xe2\x80\xa6 $null = PackageManagement\\Uninstall-Package @PSBoundParameters\n | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n | No match was found for the specified search criteria and module names 'AWSPowerShell'.\nRun Code Online (Sandbox Code Playgroud)\n问题 - 我怎样才能摆脱这个?
\nMic*_*hen 10
您只需将其删除即可。如果您想通过 PowerShell 执行此操作,可以执行以下操作:
Get-Module -Name <ModuleName> -ListAvailable | Select-Object -ExpandProperty ModuleBase | Remove-Item -Recurse -Force
Run Code Online (Sandbox Code Playgroud)