Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Find-Module without parameters gives different download count #563

Open
@PrzemyslawKlys

Description

@PrzemyslawKlys

Steps to reproduce

$Test1 = Find-Module
$Test2 = Find-Module PSTeams
$Test3 = $Test1 | Where-Object { $_.name -eq 'PSTeams' }
$Test2.AdditionalMetaData | fl
$Test3.AdditionalMetaData | fl

summary                   : Simple project to send messages to Microsoft Teams Channel.
tags                      : Teams Microsoft MSTeams Notifications Windows macOS Linux PSModule PSEdition_Desktop PSEdition_Core
isAbsoluteLatestVersion   : True
ItemType                  : Module
packageSize               : 133812
description               : Simple project to send messages to Microsoft Teams Channel.
CompanyName               : Evotec
NormalizedVersion         : 1.0.0
updated                   : 2019-12-23T10:24:24Z
requireLicenseAcceptance  : False
lastUpdated               : 23.12.2019 10:24:24 +01:00
SourceName                : PSGallery
versionDownloadCount      : 21
isLatestVersion           : True
developmentDependency     : False
IsPrerelease              : false
Functions                 : New-TeamsActivityImage New-TeamsActivitySubtitle New-TeamsActivityText New-TeamsActivityTitle New-TeamsBigImage New-TeamsButton New-TeamsFact New-Team 
                            sImage New-TeamsList New-TeamsListItem New-TeamsSection Send-TeamsMessage Send-TeamsMessageBody
created                   : 22.12.2019 20:20:34 +01:00
GUID                      : a46c3b0b-5687-4d62-89c5-753ae01e0926
published                 : 22.12.2019 20:20:34 +01:00
copyright                 : (c) 2011 - 2019 Przemyslaw Klys. All rights reserved.
Authors                   : Przemyslaw Klys
downloadCount             : 24563
PackageManagementProvider : NuGet
PowerShellVersion         : 5.1
FileList                  : PSTeams.nuspec|PSTeams.psd1|PSTeams.psm1|Images\add.jpg|Images\alert.jpg|Images\cancel.jpg|Images\check.jpg|Images\disable.jpg|Images\info.jpg|Images\ 
                            minus.jpg|Images\question.jpg|Images\reload.jpg

summary                   : Simple project to send messages to Microsoft Teams Channel.
tags                      : Teams Microsoft MSTeams Notifications Windows macOS Linux PSModule PSEdition_Desktop PSEdition_Core
isAbsoluteLatestVersion   : True
ItemType                  : Module
packageSize               : 133812
description               : Simple project to send messages to Microsoft Teams Channel.
CompanyName               : Evotec
NormalizedVersion         : 1.0.0
updated                   : 2019-12-22T20:20:34Z
requireLicenseAcceptance  : False
lastUpdated               : 22.12.2019 20:20:34 +01:00
SourceName                : PSGallery
versionDownloadCount      : 0
isLatestVersion           : True
developmentDependency     : False
IsPrerelease              : false
title                     : PSTeams
created                   : 22.12.2019 20:20:34 +01:00
GUID                      : a46c3b0b-5687-4d62-89c5-753ae01e0926
published                 : 22.12.2019 20:20:34 +01:00
copyright                 : (c) 2011 - 2019 Przemyslaw Klys. All rights reserved.
Authors                   : Przemyslaw Klys
downloadCount             : 24537
Functions                 : New-TeamsActivityImage New-TeamsActivitySubtitle New-TeamsActivityText New-TeamsActivityTitle New-TeamsBigImage New-TeamsButton New-TeamsFact New-Team 
                            sImage New-TeamsList New-TeamsListItem New-TeamsSection Send-TeamsMessage Send-TeamsMessageBody
PackageManagementProvider : NuGet
PowerShellVersion         : 5.1
FileList                  : PSTeams.nuspec|PSTeams.psd1|PSTeams.psm1|Images\add.jpg|Images\alert.jpg|Images\cancel.jpg|Images\check.jpg|Images\disable.jpg|Images\info.jpg|Images\ 
                            minus.jpg|Images\question.jpg|Images\reload.jpg

Expected behavior

Same output on versionDownloadCount, downloadCount.

Actual behavior

It's like FInd-Module without parameters uses some kind of cache.

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      7.0.0-rc.1
PSEdition                      Core
GitCommitId                    7.0.0-rc.1
OS                             Microsoft Windows 10.0.18363
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
> Get-Module -ListAvailable PowerShellGet,PackageManagement

    Directory: C:\Users\przemyslaw.klys\Documents\PowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     1.4.5                 PackageManagement                   Desk      {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource…}
Script     2.2.1                 PowerShellGet                       Desk      {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability…}

    Directory: C:\program files\powershell\7-preview\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     1.4.5                 PackageManagement                   Desk      {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource…}
Script     2.2.2                 PowerShellGet                       Desk      {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability…}

    Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     1.4.1                 PackageManagement                   Desk      {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource…}
Script     2.2                   PowerShellGet                       Desk      {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability…}

    Directory: C:\Users\przemyslaw.klys\Documents\WindowsPowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     1.4.5                 PackageManagement                   Desk      {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource…}
Script     2.2.1                 PowerShellGet                       Desk      {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability…}
> Get-PackageProvider -ListAvailable

Name                     Version          DynamicOptions
----                     -------          --------------
NuGet                    3.0.0.1          Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrereleaseVersions, ConfigFile, SkipValidate  
PowerShellGet            2.2.2.0          PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathUpdate, AllowPrereleaseVersions, Filter,…
PowerShellGet            2.2.1.0          PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathUpdate, AllowPrereleaseVersions, Filter,…
PowerShellGet            2.2.0.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions