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
In non-root pwsh: Get-InstalledPSResource Az -Scope AllUsers
Notice that the module is not found
In root bash shell: chmod -R a+rX /usr/local/share/powershell/
In non-root pwsh: Get-InstalledPSResource Az -Scope AllUsers
Notice that the module is now found
Expected behavior
Module is available in root and non-root pwsh
Actual behavior
Module only available in root pwsh
Error details
PS /home/nfaulkne> Get-InstalledPSResource Az -Scope AllUsersGet-InstalledPSResource: No match was found for package 'Az'.PS /home/nfaulkne> Get-ErrorException : Type : Microsoft.PowerShell.PSResourceGet.UtilClasses.ResourceNotFoundException Message : No match was found for package 'Az'. HResult : -2146233088TargetObject : Microsoft.PowerShell.PSResourceGet.Cmdlets.GetInstalledPSResourceCommandCategoryInfo : ObjectNotFound: (Microsoft.PowerShel…edPSResourceCommand:GetInstalledPSResourceCommand) [Get-InstalledPSResource], ResourceNotFoundExceptionFullyQualifiedErrorId : InstalledPackageNotFound,Microsoft.PowerShell.PSResourceGet.Cmdlets.GetInstalledPSResourceCommandInvocationInfo : MyCommand : Get-InstalledPSResource ScriptLineNumber : 1 OffsetInLine : 1 HistoryId : 1 Line : Get-InstalledPSResource Az -Scope AllUsers Statement : Get-InstalledPSResource Az -Scope AllUsers PositionMessage : At line:1 char:1 + Get-InstalledPSResource Az -Scope AllUsers + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ InvocationName : Get-InstalledPSResource CommandOrigin : InternalScriptStackTrace : at <ScriptBlock>, <No file>: line 1PipelineIterationInfo : 0 1
Environment data
PS /root>Get-Module Microsoft.PowerShell.PSResourceGet; $PSVersionTable
ModuleType Version PreRelease Name ExportedCommands
-----------------------------------------------
Binary 1.0.4.1 Microsoft.PowerShell.PSResourceGet {Find-PSResource,Get-InstalledPSResource,Get-PS…
Key : PSVersion
Value : 7.4.5
Name : PSVersion
Key : PSEdition
Value : Core
Name : PSEdition
Key : GitCommitId
Value : 7.4.5
Name : GitCommitId
Key : OS
Value : Ubuntu 22.04.3 LTS
Name : OS
Key : Platform
Value : Unix
Name : Platform
Key : PSCompatibleVersions
Value : {1.0,2.0,3.0,4.0…}
Name : PSCompatibleVersions
Key : PSRemotingProtocolVersion
Value : 2.3
Name : PSRemotingProtocolVersion
Key : SerializationVersion
Value : 1.1.0.1
Name : SerializationVersion
Key : WSManStackVersion
Value : 3.0
Name : WSManStackVersion
Visuals
No response
The text was updated successfully, but these errors were encountered:
I tested with Install-PSResource once I realized Install-Module was using the old PowerShellGet instead of the newer Microsoft.PowerShell.PSResourceGet, but it seems I updated the Get-InstalledModule in the reproduction steps but forgot to update the Install-Module. I've just re-tested and updated the reproduction steps.
Prerequisites
Steps to reproduce
Running on a linux machine
umask 0027
pwsh
Install-PSResource Az -Scope AllUsers
Get-InstalledPSResource Az -Scope AllUsers
Get-InstalledPSResource Az -Scope AllUsers
chmod -R a+rX /usr/local/share/powershell/
Get-InstalledPSResource Az -Scope AllUsers
Expected behavior
Module is available in root and non-root pwsh
Actual behavior
Module only available in root pwsh
Error details
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: