question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get-InstalledPSResource should be Get-PSResource

See original GitHub issue

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

Creating this issue because my comment was not addressed in #919 about Get-PSResource rename to include Installed.

Latest MS reasoning https://github.com/PowerShell/PowerShellGet/issues/919#issuecomment-1419636861:

We had an internal discussion about this, and want to make it analogous to V2 cmdlets where we have Get-InstalledModule (from the PSGet side) and Get-Module (from PowerShell side) and reduce confusion between their different outputs. Get-InstalledModule (and in V3 Get-InstalledPSResource) would get resources installed via PowerShellGet on your machine, not all of them as Get-Module does. We will also look into an alias for the command.

My comment https://github.com/PowerShell/PowerShellGet/issues/919#issuecomment-1419871881

There is no overlap/confusion between Get-Module and Get-PSResource because the noun has changed to PSResource. So why are we trying to keep the v2 convention with “Installed” as a prefix? I’m trying to understand the reasoning as “Installed” is redundant as it’s already implied that it’s installed on the system with the Get verb. If it wasn’t already installed or locally present on the system then it would have a different verb.

Issue #919 and PR #1071.

I would like to know why the team thinks there will be added value by adding Installed when the noun is PSResource not Module which was the issue with v2.

Expected behavior

Get-PSResource

Actual behavior

Get-InstalledPSResource

Error details

No response

Environment data

7.4-preview3
beta21

Visuals

No response

Issue Analytics

  • State:closed
  • Created 5 months ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ThomasNietocommented, May 26, 2023

@SydneyhSmith can we get an update on why MS thinks adding Installed as a prefix creates value to Get-PSResource? In my comment rebutting the change had others like @Jaykul agreeing with me.

Here are some other points as well:

  • Longer cmdlet names creates user experience difficulties especially with those who do not use tab completion.
  • Users expect modules to have the same noun for cmdlets, this breaks that convention.
  • Users can no longer use *-PSResource with tab completion or Get-Command -Noun PSResource to get all the verbs associated with that noun.
  • The only reason that v2 had Installed as a prefix for Get-InstalledModule is because Get-Module was already used and something else had to be used. By using Get-InstalledModule caused user confusion since the two cmdlets didn’t use the same output. This is no longer an issue because v3 uses a completely different noun PSResource. There is no user expectation that the output between Get-Module and Get-PSResource would be the same.

If there is something I’m missing please let me know but right now the pros/cons are pointing to using Get-PSResource.

0reactions
alericksoncommented, Jul 12, 2023

Resolved in #1216

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install-PSResource - PowerShell
This cmdlet installs resources from a registered repository to an installation path on a machine. By default, the cmdlet doesn't return any object....
Read more >
What's new in PowerShellGet v3?
List Installed Modules. You can use Get-PSResource to list modules, and other resources, that have been installed with PowerShellGet.
Read more >
Install-PSResource did not install module and is silent ...
This time it installed into ~\Documents\PowerShell\Modules\PSReadLine\2.1.0-betat2 . Yay. So I'm not sure exactly what this command did earlier ...
Read more >
What is PowerShellGet and How to Install PowerShellGet 3.0
The Install-PSResource cmdlet supports similar parameters to Install-Module but have slightly different names and meanings. For example, - ...
Read more >
The term 'Install-PSResource' is not recognized as ...
Solution. Install-PSResource command is part of PowerShellGet Package which need to be installed first.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found