API Reference
Get-ManagedModule
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
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>]#LocalParameters
- AsInventory SwitchParameter
- Return the full inventory object instead of installed module rows.
- AsJson SwitchParameter
- Return JSON instead of typed objects.
- IncludeLoaded SwitchParameter
- Include modules loaded in the current runspace as inventory evidence.
- ModulePath String[]
- Explicit module roots to scan. When omitted, PSModulePath is used.
- Name String[]
- Optional module name filters. Wildcards are supported.
- Scope String
- Module installation scope to return.
- Possible values:
CurrentUser,AllUsers - ShowSummary SwitchParameter
- Write a compact Spectre.Console inventory summary.
- Version String
- 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>]#PathParameters
- AsInventory SwitchParameter
- Return the full inventory object instead of installed module rows.
- AsJson SwitchParameter
- Return JSON instead of typed objects.
- IncludeLoaded SwitchParameter
- Include modules loaded in the current runspace as inventory evidence.
- Name String[]
- Optional module name filters. Wildcards are supported.
- Path String
- Path to a module install root or previously written inventory JSON artifact.
- Scope String
- Module installation scope to return.
- Possible values:
CurrentUser,AllUsers - ShowSummary SwitchParameter
- Write a compact Spectre.Console inventory summary.
- Version String
- 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.