PowerShell Get-Module 查看PSModulePath路径中的模块

不飞则已,一飞冲天;不鸣则已,一鸣惊人。这篇文章主要讲述PowerShell Get-Module 查看PSModulePath路径中的模块相关的知识,希望能为你提供帮助。
环境配置说明

  • Windows 21H1
  • PSVersion 5.1.19041.1320

示例
PS C:\\Users\\admin> Get-Module -ListAvailable目录: C:\\Program Files\\WindowsPowerShell\\ModulesModuleType VersionNameExportedCommands ---------- --------------------------- Script1.0.1Microsoft.PowerShell.Operation.V... {Get-OperationValidat... Binary1.0.0.1PackageManagement{Find-Package, Get-Pa... Script3.4.0Pester{Describe, Context, I... Script1.0.0.1PowerShellGet{Install-Module, Find... Script2.0.0PSReadline{Get-PSReadLineKeyHan...目录: C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\ModulesModuleType VersionNameExportedCommands ---------- --------------------------- Manifest1.0.0.0AppBackgroundTask{Disable-AppBackgroun... Manifest2.0.0.0AppLocker{Get-AppLockerFileInf... Manifest1.0.0.0AppvClient{Add-AppvClientConnec... Manifest2.0.1.0Appx{Add-AppxPackage, Get... Script1.0.0.0AssignedAccess{Clear-AssignedAccess... Manifest1.0.0.0BitLocker{Unlock-BitLocker, Su... Manifest2.0.0.0BitsTransfer{Add-BitsFile, Comple... Manifest1.0.0.0BranchCache{Add-BCDataCacheExten... Manifest1.0.0.0CimCmdlets{Get-CimAssociatedIns... Manifest1.0ConfigCI{Get-SystemDriver, Ne... Manifest1.0ConfigDefender{Get-MpPreference, Se... Manifest1.0Defender{Get-MpPreference, Se... Manifest1.0.2.0DeliveryOptimization{Delete-DeliveryOptim... Manifest1.0.0.0DirectAccessClientComponents{Disable-DAManualEntr... Script3.0Dism{Add-AppxProvisionedP... Manifest1.0.0.0DnsClient{Resolve-DnsName, Cle... Manifest1.0.0.0EventTracingManagement{Start-EtwTraceSessio... Manifest2.0.0.0International{Get-WinDefaultInputM... Manifest1.0.0.0iSCSI{Get-IscsiTargetPorta... Script1.0.0.0ISE{New-IseSnippet, Impo... Manifest1.0.0.0Kds{Add-KdsRootKey, Get-... Manifest1.0.1.0Microsoft.PowerShell.Archive{Compress-Archive, Ex... Manifest3.0.0.0Microsoft.PowerShell.Diagnostics{Get-WinEvent, Get-Co... Manifest3.0.0.0Microsoft.PowerShell.Host{Start-Transcript, St... Manifest1.0.0.0Microsoft.PowerShell.LocalAccounts{Add-LocalGroupMember... Manifest3.1.0.0Microsoft.PowerShell.Management{Add-Content, Clear-C... Script1.0Microsoft.PowerShell.ODataUtilsExport-ODataEndpointP... Manifest3.0.0.0Microsoft.PowerShell.Security{Get-Acl, Set-Acl, Ge... Manifest3.1.0.0Microsoft.PowerShell.Utility{Format-List, Format-... Manifest3.0.0.0Microsoft.WSMan.Management{Disable-WSManCredSSP... Manifest1.0MMAgent{Disable-MMAgent, Ena... Manifest1.0.0.0MsDtc{New-DtcDiagnosticTra... Manifest2.0.0.0NetAdapter{Disable-NetAdapter, ... Manifest1.0.0.0NetConnection{Get-NetConnectionPro... Manifest1.0.0.0NetEventPacketCapture{New-NetEventSession,... Manifest2.0.0.0NetLbfo{Add-NetLbfoTeamMembe... Manifest1.0.0.0NetNat{Get-NetNat, Get-NetN... Manifest2.0.0.0NetQos{Get-NetQosPolicy, Se... Manifest2.0.0.0NetSecurity{Get-DAPolicyChange, ... Manifest1.0.0.0NetSwitchTeam{New-NetSwitchTeam, R... Manifest1.0.0.0NetTCPIP{Get-NetIPAddress, Ge... Manifest1.0.0.0NetworkConnectivityStatus{Get-DAConnectionStat... Manifest1.0.0.0NetworkSwitchManager{Disable-NetworkSwitc... Manifest1.0.0.0NetworkTransition{Add-NetIPHttpsCertBi... Manifest1.0.0.0PcsvDevice{Get-PcsvDevice, Star... Binary1.0.0.0PersistentMemory{Get-PmemDisk, Get-Pm... Manifest1.0.0.0PKI{Add-CertificateEnrol... Manifest1.0.0.0PnpDevice{Get-PnpDevice, Get-P... Manifest1.1PrintManagement{Add-Printer, Add-Pri... Binary1.0.12ProcessMitigations{Get-ProcessMitigatio... Script3.0Provisioning{Install-Provisioning... Manifest1.1PSDesiredStateConfiguration{Set-DscLocalConfigur... Script1.0.0.0PSDiagnostics{Disable-PSTrace, Dis... Binary1.1.0.0PSScheduledJob{New-JobTrigger, Add-... Manifest2.0.0.0PSWorkflow{New-PSWorkflowExecut... Manifest1.0.0.0PSWorkflowUtilityInvoke-AsWorkflow Manifest1.0.0.0ScheduledTasks{Get-ScheduledTask, S... Manifest2.0.0.0SecureBoot{Confirm-SecureBootUE... Manifest2.0.0.0SmbShare{Get-SmbShare, Remove... Manifest2.0.0.0SmbWitness{Get-SmbWitnessClient... Manifest1.0.0.1StartLayout{Export-StartLayout, ... Manifest2.0.0.0Storage{Add-InitiatorIdToMas... Manifest1.0.0.0StorageBusCache{Clear-StorageBusDisk... Manifest2.0.0.0TLS{New-TlsSessionTicket... Manifest1.0.0.0TroubleshootingPack{Get-TroubleshootingP... Manifest2.0.0.0TrustedPlatformModule{Get-Tpm, Initialize-... Binary2.1.639.0UEV{Clear-UevConfigurati... Manifest2.0.0.0VpnClient{Add-VpnConnection, S... Manifest1.0.0.0Wdac{Get-OdbcDriver, Set-... Manifest2.0.0.0Whea{Get-WheaMemoryPolicy... Manifest1.0.0.0WindowsDeveloperLicense{Get-WindowsDeveloper... Script1.0WindowsErrorReporting{Enable-WindowsErrorR... Manifest1.0.0.0WindowsSearch{Get-WindowsSearchSet... Manifest1.0.0.0WindowsUpdateGet-WindowsUpdateLog

参数解析 -ListAvailable
-ListAvailable < System.Management.Automation.SwitchParameter> Indicates that this cmdlet gets all installed modules. `Get-Module` gets m odules in paths listed in the PSModulePath environment variable. Without t his parameter, `Get-Module` gets only the modules that are both listed in the PSModulePath environment variable, and that are loaded in the current session. ListAvailable does not return information about modules that are not found in the PSModulePath environment variable, even if those modules are loaded in the current session.是否必需?False 位置?named 默认值False 是否接受管道输入?False 是否接受通配符?False


学习资料
  • PowerShell 版本 + 工具
  • PowerShell/PowerShell
  • 51CTO社区
【PowerShell Get-Module 查看PSModulePath路径中的模块】
感恩曾经帮助过 师万物 的人。
学有余力的话,可以了解具有开源、跨平台特性的Powershell Core。
欢迎关注公众号:悟为生心

    推荐阅读