A PowerShell module for managing the update and maintenance of PowerShell modules
Repo markwragg/PowerShell-ModuleManager, read from GitHub 1 min ago. markwragg has not joined Take My Repo.
L hide (or L/Esc hide) in its header, and clicking [ or ] there scrolls it.[ ] box to select it, a family's arrow to expand or collapse it, a column header to sort by that column, and view: or sort: in the title bar to cycle them. Click a key in the help bar to press it, and y or N to answer a confirmation. The wheel scrolls the list, the details view and the output pane. On Windows it uses the console's own mouse input; elsewhere it needs a terminal that reports the mouse in xterm's SGR format, as most do. Hold Shift to select text in the terminal while modman has the mouse, or use Show-ModuleManager -NoMouse to leave it to the terminal.Find-PSResource or Find-Module for each module: about 230 modules take about 2 s, against about 9 s with PSResourceGet and minutes with PowerShellGet. Other repositories, and feeds that can't be reached or that need credentials, are still queried with the package manager.AllUsers modules, run as administrator when the session isn't: the confirmation says so, Windows asks for permission, and the action runs in a hidden elevated PowerShell process, with its output and progress in the output pane as usual. Choosing No at the Windows prompt changes nothing.Move-ManagedModule (and M in the terminal UI) keeps each module with its edition's modules. Before, a module in Program Files\WindowsPowerShell\Modules, which both Windows PowerShell and PowerShell 7 use, moved to CurrentUser from PowerShell 7 went to Documents\PowerShell\Modules, where Windows PowerShell doesn't look. It now goes to Documents\WindowsPowerShell\Modules, with a warning when the session doesn't look there (PowerShell 7 only does by default when it's started from Windows PowerShell).-ComputerName, -Session) or the other edition (-Edition), stopping the repository check or an operation could leave the connection unable to run anything else, or freeze the UI. This happened when the stop came before the command had started on the other end (for example, pressing R straight after starting), as the stop was lost and the command carried on there. Stops now wait for the command to start, and give up after a time limit; if the connection is still busy afterwards, the terminal UI reconnects, and says so.Move-ManagedModule moves modules, or specific versions, between the CurrentUser and AllUsers scopes, for example Move-ManagedModule Pester -Destination AllUsers. Each version is copied (so it takes the destination folder's permissions) and the original removed only once the copy is complete; the install record is updated so PowerShellGet and PSResourceGet still recognise it. It needs an elevated session, and warns when moving to CurrentUser a version that a module installed for all users depends on.32% latest) once the repository check is done, when the window is wide enough.