PSResourceGet icon indicating copy to clipboard operation
PSResourceGet copied to clipboard

PSResourceGet should ship inbox in Windows PowerShell

Open SydneyhSmith opened this issue 2 years ago • 10 comments

Summary of the new feature / enhancement

This is an open issue, if this is important to you please describe your scenario/use case. In particular it's important to record why installing the module poses a challenge. Thanks!

Proposed technical implementation details (optional)

No response

SydneyhSmith avatar Oct 06 '23 17:10 SydneyhSmith

Yes, it should ship in-box. The issue I'm running into trying to bootstrap PowerShellGet to upgrade to PSResourceGet on machines that don't have access to the internet is impossible without workarounds. PSGet requires the PackageManagement NuGet provider which is not present on the Windows image. To get the provider PackageManagement requires the internet which I do not have. I can't upgrade to PSResourceGet from PSGet. If PSResourceGet was shiped in-box then I could just configure my internal Artifactory feed and be on my way.

ThomasNieto avatar Oct 06 '23 20:10 ThomasNieto

If you decide to ship Microsoft.PowerShell.PSResourceGet with Windows, please also make sure the shim (PowerShellGet v3) is included too.

  • Install-PSResource (Microsoft.PowerShell.PSResourceGet) is way less intuitive than the simple verb noun philosophy PowerShell is trying to teach people just getting started, which I feel Install-Module (PowerShellGet) does much better.
  • Install-Module also feels much more native / core functionality / an integral part of PowerShell, than Install-PSResource.

It should be of high priority to keep PowerShell and core functionality like installing modules easy and intuitive.

o-l-a-v avatar Oct 09 '23 20:10 o-l-a-v

We rely heavily on Intune Remediation that install scripts via PSGet. since Remediations use v5.1 it would be difficult to use the new module without alot of extra prerequisite setup.

BladeFireLight avatar Oct 10 '23 03:10 BladeFireLight

@BladeFireLight both modules can be installed side by side as they use different command names. Existing scripts can use the old module.

ThomasNieto avatar Oct 10 '23 03:10 ThomasNieto

How far back would this go in terms of supported Windows versions if this were to happen and how would you get over the issue of PowerShellGet 1.0.0.1 still being shipped & replace this

In particular it's important to record why installing the module poses a challenge. Thanks!

It's less of it posing a challenge though as mentioned by @ThomasNieto that scenario is just but one but for me this is more a need that would more that from a sustainability perspective this is a huge waste of not only CPU time and resources but also for us in image build/deployments in having to build & test additional processes for adding this in as part of the default images that are being used by anyone that is currently using a Windows installation, whether that be Windows Admins, Developers or everyday Users all around the world. We should aim to tackle as many of these major wastes as best as we can and this is one good example of where this would be a huge win for many.

Now if the question (which has been asked time and time again) ended up being about whether pwsh was to be inboxed too (which almost all that I have spoken to have said yes please) then this ask would be less a need as PSResourceGet would be shipped as part of that install, and again would be another, albeit separate, ongoing discussion.

kilasuit avatar Oct 10 '23 03:10 kilasuit

I've waited for this day to come. Please DO IT, but please keep in mind the utter horror of upgrading PackageManagement. Even when the box IS online. Most MSFT documentation on how to correctly update it is misleading AT BEST. More on this point in a separate comment when I have more time.

no-identd avatar Oct 11 '23 18:10 no-identd

I've waited for this day to come. Please DO IT, but please keep in mind the utter horror of upgrading PackageManagement. Even when the box IS online. Most MSFT documentation on how to correctly update it is misleading AT BEST. More on this point in a separate comment when I have more time.

Not just documentation from Microsoft but there's likely many thousand blogs/articles/support docs for orgs that require these painful steps to be done when in future is would reduce unnecessary friction in so many places if PSResourceGet was built in

kilasuit avatar Oct 11 '23 23:10 kilasuit

I still utterly lack time to detail/properly write up the issues I mean in particular, but I did—barely—have enough time to refind the two github issues I eventually identified as related to it (one of them is in closed state, but it contains valuable information!):

https://github.com/OneGet/oneget/issues/472

https://github.com/PowerShell/PowerShellGetv2/issues/599

And what I also refound:
this stackoverflow post which, while not at all directly related (unlike those two issues), contains a lot of valuable information on NuGet behavior I had to figure out before I could figure the whole upgrade-PackageManagement-the-right-way dance; word of caution tho, IF the notes past me left for myself are right, all answers to that stackoverflow question including the accepted one are in some way or another incorrect (which didn't matter to me since I didn't have the question in the first place, I just found the thread while debugging what was going on with my powershell install, and for that, the details from there were extremely useful):

https://stackoverflow.com/questions/39257572/loading-assemblies-from-nuget-packages

no-identd avatar Oct 12 '23 12:10 no-identd

I've waited for this day to come. Please DO IT, but please keep in mind the utter horror of upgrading PackageManagement. Even when the box IS online. Most MSFT documentation on how to correctly update it is misleading AT BEST. More on this point in a separate comment when I have more time.

Not just documentation from Microsoft but there's likely many thousand blogs/articles/support docs for orgs that require these painful steps to be done when in future is would reduce unnecessary friction in so many places if PSResourceGet was built in

this. exactly this. I want it in-box as well, and certainly do not wish to go through the pain of having everyone I'm assisting getting started with PowerShell update outdated in-box stuff, especially for package management

awakecoding avatar Oct 24 '23 23:10 awakecoding

Yes, it should ship in-box. The issue I'm running into trying to bootstrap PowerShellGet to upgrade to PSResourceGet on machines that don't have access to the internet is impossible without workarounds. PSGet requires the PackageManagement NuGet provider which is not present on the Windows image. To get the provider PackageManagement requires the internet which I do not have. I can't upgrade to PSResourceGet from PSGet. If PSResourceGet was shiped in-box then I could just configure my internal Artifactory feed and be on my way.

That's the exactly issue I'm facing now. So please ship PSResourceGet inbox.

ronascentes avatar Nov 17 '23 16:11 ronascentes