PowerShell / PSResourceGet

PSResourceGet is the package manager for PowerShell
https://www.powershellgallery.com/packages/Microsoft.PowerShell.PSResourceGet
MIT License
479 stars 90 forks source link

Get-PSResourceRepository in non-elevated prompt can't see repos that were registered in an elevated prompt #1596

Closed nbarnwell closed 4 months ago

nbarnwell commented 4 months ago

Prerequisites

Steps to reproduce

  1. Register-PSResourceRepository in elevated session
  2. Close/reopen elevated session, Get-PSResourceRepository returns the PSGallery and the new repository
  3. Open non-elevated session, invoke Get-PSResourceRepository

Expected behavior

Both repositories are listed.

Actual behavior

Only the PSGallery repository is listed.

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.1
PSEdition                      Core
GitCommitId                    7.4.1
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

SydneyhSmith commented 4 months ago

Thanks @nbarnwell what is the output of gmo in both consoles? And Get-Command Get-PSResourceRepository

microsoft-github-policy-service[bot] commented 4 months ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.