PowerShellGetv2 icon indicating copy to clipboard operation
PowerShellGetv2 copied to clipboard

Find-Module -Author

Open PrzemyslawKlys opened this issue 5 years ago • 2 comments

It would be nice to be able to filter out Find-Module by Authors. Right now you have to use

$All = Find-Module
$All | Where-Object { $_.Author -eq 'Przemyslaw Klys' }

Which is less than optimal - on users end and most likely on server's end.

PrzemyslawKlys avatar Jul 22 '19 18:07 PrzemyslawKlys

Thanks @PrzemyslawKlys this is a feature request that we have considered before, and will consider for PowerShellGet 3.0... From you perspective is filtering by Author better than by Owner?

SydneyhSmith avatar Jul 23 '19 16:07 SydneyhSmith

To be honest I've never noticed there is a difference. Generally, I wanted to build something like this:

image

The problem I have was in 2 places. Asking for modules I authored/own which required me to get all modules first and then do a filter. And then when I had a list of modules I own I had to ask again for each module separately:

Find-Module -Name $_.Name -AllVersions -AllowPrerelease

This finally allowed me to build the list I wanted. But during testing, each of those queries was taking so much time that I had to build export/import to XML so that I don't query your servers all the time. If there would be a better way to ask for all that, it would be cool.

Find-Module -Author 'Przemyslaw Klys' -AllVersions -AllowPrerelease

Would work I guess. But maybe others need owners. For me, it's the same thing.

PrzemyslawKlys avatar Jul 23 '19 16:07 PrzemyslawKlys