PowerShell 技能连载 - 管理已安装的模块(第 1 部分)

通过 Install-Module 安装新的 PowerShell 模块时,PowerShell 会记住安装位置。因此,很容易获得通过 Install-Module 安装的模块的列表:

1
2
3
4
5
6
7
8
9
10
11
PS> Get-InstalledModule

Version Name Repository Description
------- ---- ---------- -----------
2.7.1.9 ISESteroids PSGallery Extension for PowerShell ISE 3.0 and better
2.2.0 PoSHue PSGallery Script and Control your Philips Hue Bridge, Lights, Gro...
0.14.0 platyPS PSGallery Generate PowerShell External Help files from Markdown
2.4 PSOneTools PSGallery commands taken from articles published at https://power...
1.0 QRCodeGenerator PSGallery Automatically creates QR codes as PNG images for person...
1.0 ScriptBlockLoggingAnalyzer PSGallery Functions to manage PowerShell script block logging
1.0 UserProfile PSGallery This module manages user profiles on local and remote c...

由于新版本是并行安装的,因此可以搜索不再需要的旧版本:

1
2
Get-InstalledModule |
Get-InstalledModule -AllVersions

PowerShell 技能连载 - 管理已安装的模块(第 1 部分)

http://blog.vichamp.com/2020/11/18/managing-installed-modules-part-1/

作者

吴波

发布于

2020-11-18

更新于

2022-07-06

许可协议

评论