Get-ManagedModule
Gets installed PowerShell modules from managed module inventory.
Syntax
Get-ManagedModule
[-AsInventory]
[-AsJson]
[-IncludeLoaded]
[-ModulePath <String[]>]
[[-Name] <String[]>]
[-Scope <CurrentUser| AllUsers>]
[-ShowSummary]
[-Version <String>]
[<CommonParameters>]#LocalGet-ManagedModule
[-AsInventory]
[-AsJson]
[-IncludeLoaded]
[[-Name] <String[]>]
-Path <String>
[-Scope <CurrentUser| AllUsers>]
[-ShowSummary]
[-Version <String>]
[<CommonParameters>]#PathDescription
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-ManagedModuleInventory loaded and installed Graph modules
Get-ManagedModule -Name Microsoft.Graph.* -IncludeLoaded -ShowSummaryPreview uninstalling an exact installed module
Get-ManagedModule -Name Company.Tools -Version 1.2.0 | Uninstall-ManagedModule -WhatIfParameters
- -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.
- -Path String
- Path to a module install root or previously written inventory JSON artifact.
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.
Outputs
PSPublishModule.ModuleStateInstalledModuleResult: PowerShell-facing installed module inventory entry. PSPublishModule.ModuleStateInventoryResult: PowerShell-facing module-state inventory result.