Skip to content

Get-InstalledPSResource does not return scripts #1187

@o-l-a-v

Description

@o-l-a-v

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

Steps to reproduce

Testing out beta 22 manually downloaded from PowerShellGallery ( https://www.powershellgallery.com/packages/PSResourceGet ), I noticed that Get-InstalledPSResource does not return scripts.

  • Shouldn't it?

There's also no parameter -Type, like PackageManagement\Get-Package for instance has. I'd expect that, as AFAIK both scripts and modules are PSResources.

  • Is a script a PSResource?

Example command, I've set the module path in user context to be outside OneDrive.

Get-InstalledPSResource -Path ('{0}\Microsoft\PowerShell\Scripts' -f $env:LOCALAPPDATA)

Expected behavior

Return a list of scripts and modules (installed by script dependencies) found in said directory.

Actual behavior

PS C:\Users\redacted> Get-InstalledPSResource -Path ('{0}\Microsoft\PowerShell\Scripts' -f $env:LOCALAPPDATA)

Name         Version   Prerelease Repository Description
----         -------   ---------- ---------- -----------
AzureAD      2.0.2.180            PSGallery  Azure Active Directory V2 General Availability Module.…
AzureAD      2.0.2.140            PSGallery  Azure Active Directory V2 General Availability Module.…
PSIntuneAuth 1.2.3                PSGallery  Provides a function to retrieve an authentication token for Intune Graph API calls.

PS C:\Users\redacted>

Error details

No response

Environment data

PSResourceGet v3 beta 22
PowerShell x64 v7.3.4 installed with MSI

Visuals

No response

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