You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
Get-InstalledModule -Name <ModuleName> #Returns Information about installed Module
Actual behavior
Get-InstalledModule -Name <ModuleName>Returns the Error:Get-Package: No match was found for the specified search criteria and module names 'MicrosoftTeams'.
Error details
No response
Environment data
PS C:\>$PSVersionTable
Name Value
---------
PSVersion 7.2.6
PSEdition Core
GitCommitId 7.2.6
OS Microsoft Windows 10.0.19044
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Thanks for letting us know of this issue Andres Bohren (@BohrenAn)! Are you encountering this issue with Get-PSResource in PowerShellGet 3.0.17-beta17? We're currently only adding security bug fixes to PowerShellGet v2, but will address any v2 issues or bugs in v3.
Andres Bohren (@BohrenAn) thanks for sharing this info! There's 2 aspects to it. Firstly, with searching for packages installed under "Program Files" included in the path, that denotes machine wide scope, so to search for it you would need to add -Scope AllUsers (instead of the default which is CurrentUser). So an example would be Get-PSResource -Name "PowerShellGet" -Scope AllUsers.
Secondly, modules/scripts installed on WindowsPowerShell (i.e they have "WindowsPowerShell" included in their path), would not be accessible from PowerShell6+. But, modules/scripts installed on PowerShell6+ are accessible from WindowsPowerShell. For you to resolve your issue, if you can install MicrosoftTeams through PowerShell7 then it should be discoverable and accessible with Get-PSResource. Please let us know if that works, thanks!
PS C:\> get-host
Name : ConsoleHost
Version : 7.2.7
InstanceId : 9a2e4618-12e0-45ad-8558-dfdd8e1e91ba
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-CH
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace
PS C:\> Get-InstalledModule Icewolf.EXO.Spamanalyze
Get-Package: No match was found for the specified search criteria and module names 'Icewolf.EXO.Spamanalyze'.
PS C:\> Install-Module Icewolf.EXO.Spamanalyze -Scope AllUsers
PS C:\> Get-InstalledModule Icewolf.EXO.Spamanalyze
Get-Package: No match was found for the specified search criteria and module names 'Icewolf.EXO.Spamanalyze'.
PS C:\> Install-Module Icewolf.EXO.Spamanalyze -Scope CurrentUser
PS C:\> Get-InstalledModule Icewolf.EXO.Spamanalyze
Get-Package: No match was found for the specified search criteria and module names 'Icewolf.EXO.Spamanalyze'.
It works with the MicrosoftTeams Module
PS C:\> Get-InstalledModule MicrosoftTeams | fl Name, Version, InstalledLocation
Name : MicrosoftTeams
Version : 4.9.0
InstalledLocation : C:\Program Files\PowerShell\Modules\MicrosoftTeams\4.9.0
The Module is installed in two Directorys (has to be installed in each PowerShell Version separatly)
C:\Program Files\WindowsPowerShell\Modules\MicrosoftTeams\4.9.0 (PowerShell 5)
C:\Program Files\PowerShell\Modules\MicrosoftTeams\4.9.0 (PowerShell 7)
But check this out (PowerShell 7)
PS C:\> get-InstalledModule PnP.PowerShell
Get-Package: No match was found for the specified search criteria and module names 'PnP.PowerShell'.
PS C:\> get-package PnP.PowerShell
Get-Package: No package found for 'PnP.PowerShell'.
PS C:\> install-Module PnP.PowerShell
WARNING: Version '1.9.0' of module 'PnP.PowerShell' is already installed at 'C:\Program Files\WindowsPowerShell\Modules\PnP.PowerShell\1.9.0'. To install version '1.11.0', run Install-Module and add the -Force parameter, this command will install version '1.11.0' side-by-side with version '1.9.0'.
PS C:\>
Seems to be that you can install some Modules and some not.
Some modules you can load even if they are installed in "C:\Program Files\WindowsPowerShell\Modules"
Andres Bohren (@BohrenAn) we completely understand the frustration with this PowerShellGet V2 behavior. We are working on PowerShellGet V3 to be less confusing and handle such scenarios better. If you try finding the installed MicrosoftTeams package with the PowerShellGetV3 cmdlet Get-PSResource like such: Get-PSResource -Name "MicrosoftTeams" -Scope AllUsers are you able to find it?
Andres Bohren (@BohrenAn)
PSGet 2.2.5 (and its cmdlet Install-Module) defaults to CurrentUser for PowerShell5 and 7.
Lower versions of PSGet may not default to CurrentUser.
Activity
alerickson commentedon Oct 24, 2022
Thanks for letting us know of this issue Andres Bohren (@BohrenAn)! Are you encountering this issue with
Get-PSResourcein PowerShellGet 3.0.17-beta17? We're currently only adding security bug fixes to PowerShellGet v2, but will address any v2 issues or bugs in v3.BohrenAn commentedon Oct 25, 2022
alerickson
I did run the following command. No return value. Does this help?
PS C:\Users\a.bohren> Get-PSResource -Name MicrosoftTeams
PS C:\Users\a.bohren> Get-Module
ModuleType Version PreRelease Name ExportedCommands
Manifest 7.0.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-Item, Clear-It…
Manifest 7.0.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Ob…
Script 1.4.7 PackageManagement {Find-Package, Find-PackageProvider, Get-Package,…
Script 2.2.5 PowerShellGet {Find-Command, Find-DscResource, Find-Module, Fin…
Binary 3.0.17 beta17 PowerShellGet {Find-PSResource, Get-PSResource, Get-PSResourceR…
Script 2.1.0 PSReadLine {Get-PSReadLineKeyHandler, Get-PSReadLineOption, …
anamnavi commentedon Nov 7, 2022
Andres Bohren (@BohrenAn) thanks for sharing this info! There's 2 aspects to it. Firstly, with searching for packages installed under "Program Files" included in the path, that denotes machine wide scope, so to search for it you would need to add
-Scope AllUsers(instead of the default which isCurrentUser). So an example would beGet-PSResource -Name "PowerShellGet" -Scope AllUsers.Secondly, modules/scripts installed on WindowsPowerShell (i.e they have
"WindowsPowerShell"included in their path), would not be accessible from PowerShell6+. But, modules/scripts installed on PowerShell6+ are accessible from WindowsPowerShell. For you to resolve your issue, if you can installMicrosoftTeamsthrough PowerShell7 then it should be discoverable and accessible withGet-PSResource. Please let us know if that works, thanks!BohrenAn commentedon Nov 8, 2022
PowerShell 7 started as Administrator
It works with the MicrosoftTeams Module
With PowerShell 5
The Module is installed in two Directorys (has to be installed in each PowerShell Version separatly)
Seems to be that you can install some Modules and some not.
Some modules you can load even if they are installed in "C:\Program Files\WindowsPowerShell\Modules"
It's not consistent in any way. And i am not able to install several Modules in PowerShell 7. Find it very confusing...
anamnavi commentedon Nov 14, 2022
Andres Bohren (@BohrenAn) we completely understand the frustration with this PowerShellGet V2 behavior. We are working on PowerShellGet V3 to be less confusing and handle such scenarios better. If you try finding the installed
MicrosoftTeamspackage with the PowerShellGetV3 cmdletGet-PSResourcelike such:Get-PSResource -Name "MicrosoftTeams" -Scope AllUsersare you able to find it?BohrenAn commentedon Nov 22, 2022
Hi Anam Navied (@anamnavi)
Install-Module in PowerShell 5 is default to AllUsers?
Install-Module in PowerShell 7 is default to CurrentUser?
Did i get that right?
Here is the Output you asked for in PowerShell 7
PS C:> Get-Module
ModuleType Version PreRelease Name ExportedCommands
Manifest 7.0.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-Item, Clear-ItemProperty…}
Manifest 7.0.0.0 Microsoft.PowerShell.Security {ConvertFrom-SecureString, ConvertTo-SecureString, Get-Acl, …
Manifest 7.0.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object…}
Script 1.4.8.1 PackageManagement {Find-Package, Find-PackageProvider, Get-Package, Get-Packag…
Binary 3.0.17 beta17 PowerShellGet {Find-PSResource, Get-PSResource, Get-PSResourceRepository, …
Script 2.2.5 PowerShellGet {Find-Command, Find-DscResource, Find-Module, Find-RoleCapab…
Script 2.2.6 PSReadLine {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PSRe…
PS C:> Get-InstalledModule -Name "MicrosoftTeams"
Version Name Repository Description
4.9.0 MicrosoftTeams PSGallery Microsoft Teams cmdlets module for Windows PowerShe…
PS C:> Get-PSResource -Name "MicrosoftTeams" -Scope AllUsers
Name Version Prerelease Repository Description
MicrosoftTeams 4.9.0 PSGallery Microsoft Teams cmdlets module for Windows PowerShell and PowerShell Core.…
PS C:> Get-PSResource -Name "MicrosoftTeams" -Scope CurrentUser
PS C:>
anamnavi commentedon Dec 12, 2022
Andres Bohren (@BohrenAn)
PSGet 2.2.5 (and its cmdlet Install-Module) defaults to CurrentUser for PowerShell5 and 7.
Lower versions of PSGet may not default to CurrentUser.