| external help file | PSPublishModule-help.xml |
|---|---|
| Module Name | PSPublishModule |
| online version | https://github.com/EvotecIT/PSPublishModule |
| schema | 2.0.0 |
Uninstalls installed PowerShell module versions through the managed module engine.
Uninstall-ManagedModule [-InputObject] <ModuleStateInstalledModuleResult[]> [-SkipDependencyCheck] [-LoadedModule <ManagedModuleLoadedModule[]>] [-AllowLoadedModuleUninstall] [-Plan] [-WhatIf] [-Confirm] [<CommonParameters>]Uninstall-ManagedModule [-Name] <string[]> [-Version <string>] [-Prerelease] [-Scope <ManagedModuleInstallScope>] [-ShellEdition <ManagedModuleShellEdition>] [-ModuleRoot <string>] [-InstalledLocation <string>] [-SkipDependencyCheck] [-LoadedModule <ManagedModuleLoadedModule[]>] [-AllowLoadedModuleUninstall] [-Plan] [-WhatIf] [-Confirm] [<CommonParameters>]This command removes modules from the selected managed module root without invoking PowerShellGet or PSResourceGet. It follows PSResourceGet-shaped uninstall selection semantics while adding managed dependency and loaded-module safety checks. InstalledLocation always selects the exact installed directory, whether it is bound directly or received from Get-ManagedModule pipeline output. Typed Get-ManagedModule rows retain structured scanned-root provenance, so dependency checks preserve edition/profile visibility and require roots that were available during inventory to remain available. Multiple piped rows are preflighted as one batch across physical roots and selected dependents are removed before their selected dependencies.
Uninstall-ManagedModule -Name Company.ToolsUninstall-ManagedModule -Name Company.Tools -Version '[1.0.0,2.0.0)' -PlanGet-ManagedModule -Name Company.Tools -Version 1.2.0 | Uninstall-ManagedModuleAllow removal of module versions that appear loaded in the current PowerShell session.
Type: SwitchParameter
Parameter Sets: InputObjectParameterSet, NameParameterSet
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueInstalled module rows returned by Get-ManagedModule to uninstall.
Type: ModuleStateInstalledModuleResult[]
Parameter Sets: InputObjectParameterSet
Aliases: None
Possible values:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: TrueExact installed location supplied by Get-ManagedModule pipeline rows. It takes precedence over ModuleRoot.
Type: String
Parameter Sets: NameParameterSet
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: TrueLoaded module evidence used to block risky in-session uninstalls.
Type: ManagedModuleLoadedModule[]
Parameter Sets: InputObjectParameterSet, NameParameterSet
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueExplicit module root. Use with Scope Custom.
Type: String
Parameter Sets: NameParameterSet
Aliases: Path
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: TrueModule names or wildcard patterns to uninstall.
Type: String[]
Parameter Sets: NameParameterSet
Aliases: ModuleName
Possible values:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue, ByPropertyName)
Accept wildcard characters: TrueReturn an inspectable uninstall plan without removing files.
Type: SwitchParameter
Parameter Sets: InputObjectParameterSet, NameParameterSet
Aliases: None
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueRestrict matching to prerelease module versions.
Type: SwitchParameter
Parameter Sets: NameParameterSet
Aliases: AllowPrerelease
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueInstall scope used when ModuleRoot is not supplied.
Type: ManagedModuleInstallScope
Parameter Sets: NameParameterSet
Aliases: None
Possible values: CurrentUser, AllUsers, Custom
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TruePowerShell path family used when resolving default CurrentUser or AllUsers module roots.
Type: ManagedModuleShellEdition
Parameter Sets: NameParameterSet
Aliases: None
Possible values: Auto, Desktop, Core
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueSkip checking whether removed modules are still required by other installed modules.
Type: SwitchParameter
Parameter Sets: InputObjectParameterSet, NameParameterSet
Aliases: SkipDependenciesCheck
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: TrueExact version or NuGet-style version range to uninstall. When omitted, the latest matching version is selected.
Type: String
Parameter Sets: NameParameterSet
Aliases: RequiredVersion
Possible values:
Required: False
Position: named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: TrueThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
System.String[] PSPublishModule.ModuleStateInstalledModuleResult[] System.String
PowerForge.ManagedModuleUninstallResult PowerForge.ManagedModuleUninstallPlan
- None