PowerShell
PowerShell copied to clipboard
Find-MrModuleUpdate adding support for PowerShell 7
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
Great idea! I think the automatic option would be preferable. Feel free to fork the repo, add that functionality and submit a pull request.
great, will do that