Project

PSPublishModule

Build, test, version, sign, and publish PowerShell modules with reusable PowerForge pipelines.

Stars 48
Forks 16
PowerShell Gallery downloads 17,213
Release v3.0.169
Language: C# Updated: 2026-10-13

API Reference

Command

Get-ManagedModule

Namespace PSPublishModule
Inputs
System.String[]
Outputs
PSPublishModule.ModuleStateInstalledModuleResult PSPublishModule.ModuleStateInventoryResult System.String

Gets installed PowerShell modules from managed module inventory.

Remarks

This command provides the installed-module functionality of Get-InstalledPSResource while reusing the same inventory engine that powers managed estate maintenance. It returns typed installed module rows by default; those rows can be piped directly to Uninstall-ManagedModule.

Examples

Authored help example

Inventory installed modules


Get-ManagedModule
        

Inventory loaded and installed Graph modules


Get-ManagedModule -Name Microsoft.Graph.* -IncludeLoaded -ShowSummary
        

Preview uninstalling an exact installed module


Get-ManagedModule -Name Company.Tools -Version 1.2.0 | Uninstall-ManagedModule -WhatIf
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Get-ManagedModule [-AsInventory] [-AsJson] [-IncludeLoaded] [-ModulePath <String[]>] [-Name <String[]>] [-Scope <CurrentUser|AllUsers>] [-ShowSummary] [-Version <String>] [<CommonParameters>]
#
Parameter set: Local

Parameters

AsInventory SwitchParameter optionalposition: namedpipeline: False
Return the full inventory object instead of installed module rows.
AsJson SwitchParameter optionalposition: namedpipeline: False
Return JSON instead of typed objects.
IncludeLoaded SwitchParameter optionalposition: namedpipeline: False
Include modules loaded in the current runspace as inventory evidence.
ModulePath String[] optionalposition: namedpipeline: False
Explicit module roots to scan. When omitted, PSModulePath is used.
Name String[] optionalposition: 0pipeline: True (ByValue)aliases: ModuleName
Optional module name filters. Wildcards are supported.
Scope String optionalposition: namedpipeline: Falsevalues: 2
Module installation scope to return.
Possible values: CurrentUser, AllUsers
ShowSummary SwitchParameter optionalposition: namedpipeline: False
Write a compact Spectre.Console inventory summary.
Version String optionalposition: namedpipeline: False
Exact module version or explicit version range to return.

Outputs

PSPublishModule.ModuleStateInstalledModuleResult: PowerShell-facing installed module inventory entry. PSPublishModule.ModuleStateInventoryResult: PowerShell-facing module-state inventory result.

Get-ManagedModule [-AsInventory] [-AsJson] [-IncludeLoaded] [-Name <String[]>] -Path <String> [-Scope <CurrentUser|AllUsers>] [-ShowSummary] [-Version <String>] [<CommonParameters>]
#
Parameter set: Path

Parameters

AsInventory SwitchParameter optionalposition: namedpipeline: False
Return the full inventory object instead of installed module rows.
AsJson SwitchParameter optionalposition: namedpipeline: False
Return JSON instead of typed objects.
IncludeLoaded SwitchParameter optionalposition: namedpipeline: False
Include modules loaded in the current runspace as inventory evidence.
Name String[] optionalposition: 0pipeline: True (ByValue)aliases: ModuleName
Optional module name filters. Wildcards are supported.
Path String requiredposition: namedpipeline: False
Path to a module install root or previously written inventory JSON artifact.
Scope String optionalposition: namedpipeline: Falsevalues: 2
Module installation scope to return.
Possible values: CurrentUser, AllUsers
ShowSummary SwitchParameter optionalposition: namedpipeline: False
Write a compact Spectre.Console inventory summary.
Version String optionalposition: namedpipeline: False
Exact module version or explicit version range to return.

Outputs

PSPublishModule.ModuleStateInstalledModuleResult: PowerShell-facing installed module inventory entry. PSPublishModule.ModuleStateInventoryResult: PowerShell-facing module-state inventory result.