PowerShell icon indicating copy to clipboard operation
PowerShell copied to clipboard

Find-MrModuleUpdate adding support for PowerShell 7

Open alexverboon opened this issue 5 years ago • 2 comments

Hi Mike, I'm just thinking about what would be the best way to add PowerShell v7 support to this awesome function. Currently,the function checks for the following paths.

$AllUsersPath = "$env:ProgramFiles\WindowsPowerShell\Modules*" $CurrentUserPath = "$env:USERPROFILE\Documents\WindowsPowerShell\Modules*"

Option 1, add a switch parameter to define the powerShell version, this would allow someone to run the function in both PowerShell 5 and 7 and the function would just return the modules listed under the provided version.

Option 2. Check in which version the script runs, and the just output modules of the current running powershell version.

What do you thiink from a function design point of view? Cheers Alex

alexverboon avatar Oct 19 '19 09:10 alexverboon

Great idea! I think the automatic option would be preferable. Feel free to fork the repo, add that functionality and submit a pull request.

mikefrobbins avatar Oct 21 '19 21:10 mikefrobbins

great, will do that

alexverboon avatar Oct 24 '19 19:10 alexverboon