Skip to content

Latest commit

 

History

History
208 lines (163 loc) · 4.41 KB

File metadata and controls

208 lines (163 loc) · 4.41 KB
external help file PSPublishModule-help.xml
Module Name PSPublishModule
online version https://github.com/EvotecIT/PSPublishModule
schema 2.0.0

Get-ManagedModule

SYNOPSIS

Gets installed PowerShell modules from managed module inventory.

SYNTAX

Local (Default)

Get-ManagedModule [[-Name] <string[]>] [-ModulePath <string[]>] [-Version <string>] [-Scope <string>] [-IncludeLoaded] [-AsInventory] [-AsJson] [-ShowSummary] [<CommonParameters>]

Path

Get-ManagedModule [[-Name] <string[]>] -Path <string> [-Version <string>] [-Scope <string>] [-IncludeLoaded] [-AsInventory] [-AsJson] [-ShowSummary] [<CommonParameters>]

DESCRIPTION

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

EXAMPLE 1

Get-ManagedModule

EXAMPLE 2

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

EXAMPLE 3

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

PARAMETERS

-AsInventory

Return the full inventory object instead of installed module rows.

Type: SwitchParameter
Parameter Sets: Local, Path
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-AsJson

Return JSON instead of typed objects.

Type: SwitchParameter
Parameter Sets: Local, Path
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-IncludeLoaded

Include modules loaded in the current runspace as inventory evidence.

Type: SwitchParameter
Parameter Sets: Local, Path
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-ModulePath

Explicit module roots to scan. When omitted, PSModulePath is used.

Type: String[]
Parameter Sets: Local
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-Name

Optional module name filters. Wildcards are supported.

Type: String[]
Parameter Sets: Local, Path
Aliases: ModuleName
Possible values:

Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: True

-Path

Path to a module install root or previously written inventory JSON artifact.

Type: String
Parameter Sets: Path
Aliases: None
Possible values:

Required: True
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-Scope

Module installation scope to return.

Type: String
Parameter Sets: Local, Path
Aliases: None
Possible values: CurrentUser, AllUsers

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-ShowSummary

Write a compact Spectre.Console inventory summary.

Type: SwitchParameter
Parameter Sets: Local, Path
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-Version

Exact module version or explicit version range to return.

Type: String
Parameter Sets: Local, Path
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

  • System.String[]

OUTPUTS

  • PSPublishModule.ModuleStateInstalledModuleResult PSPublishModule.ModuleStateInventoryResult System.String

RELATED LINKS

  • None