https://github.com/iricigor/get-modulefast
Currently get-module command is very expensive. This is experiment in trying to make it fast.
https://github.com/iricigor/get-modulefast
module optimization powershell
Last synced: 7 months ago
JSON representation
Currently get-module command is very expensive. This is experiment in trying to make it fast.
- Host: GitHub
- URL: https://github.com/iricigor/get-modulefast
- Owner: iricigor
- License: mit
- Created: 2020-11-05T16:30:49.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-15T21:45:20.000Z (about 5 years ago)
- Last Synced: 2025-03-05T10:40:43.451Z (11 months ago)
- Topics: module, optimization, powershell
- Language: PowerShell
- Homepage:
- Size: 44.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Get-ModuleFast
Currently get-module command is very expensive. This is experiment in trying to make it fast.
## Current state
Current version on my Windows PC is running about 30 times faster than `Get-Module -ListAvailable`, but it still returns all the same modules!
## Issues
- script is now running only on PS7 on Windows
- regex `'CompatiblePSEditions.*Core'` should be improved
- it is not returning version property unless available in path
- it is not returning other properties from manifest, like ModuleType, PSEdition, ExportedCommands, etc.
## Big picture
This workflow should run fast:
- get all modules
- check if they can be updated
With current updates in PowerShell Get v3, it is expected to enable second step to run fast.
Alternatively, one can use `psaptgetupdate` ([link](https://github.com/iricigor/psaptgetupdate)) module which already has that fast functionality.
This project is trying also to enable first step to run fast.
Once both are done, you will be able to check if there are modules on your system that needs update **in less than a second!**
## Further ideas
- [x] Convert script to run also on ~~PS5 and on~~ Linux
- [ ] Add switch to include additional properties
- [x] Rename function to Get-ModuleList
- [x] Add parameter Name
- [ ] Publish it to PS Gallery as script?
- [x] Try parallel foreach operations
- [x] Put Invoke-Pester in code (currently inline in ADO pipeline)
## Test pipeline status
Testing pipeline is running on three different OS versions - Windows, Linux and MacOS.
[](https://dev.azure.com/iiric/azmi/_build/latest?definitionId=34)


*Click on image to see details.*
## Other Badges




