PowerShellGet will be renamed to Microsoft.PowerShell.PSResourceGet

PowerShellGet will be renamed to Microsoft.PowerShell.PSResourceGet

Hi All,

A few Months ago, Sydney Smith (Microsoft PowerShell PM) has announced that the PowerShellGet will be renamed to Microsoft.PowerShell.PSResourceGet

PowerShellGet in PowerShell 7.4 Updates

Version 3 previews of PowerShellGet will begin shipping in PowerShell 7.4 previews in June (preview 5) with the following updates. These changes include important plans to address migration and compatibility, and we would like to request feedback.

  • The module name “PowerShellGet” for version 3 (-PSResource cmdlets) will change to “Microsoft.PowerShell.PSResourceGet” begining with the next release (beta22).
  • PowerShell v7.4 (LTS) will ship PowerShellGet v2.2.5 and PSResourceGet v3.0.x, side-by-side. This will help us get telemetry about usage of PSResourceGet. No compatibility layer will be shipped, meaning we will not wrap version 3 commandlets with version 2 names. This allows current scripts to work as-is, with or without fully qualified cmdlet names, while still allowing customers to test the new commandlets.
  • Customers can use -PSResource cmdlets for perf improvements and new features. No new feature work will be done in -Modulecmdlets.
  • In the first preview of PowerShell v7.5 we will include CompatPowerShellGet renamed as PowerShellGet v3.0.0, in addition to publishing the latest PSResourceGet module. In PowerShell v7.5 we will not ship PowerShellGet v2.2.5.
  • In PowerShell v7.5 we plan to ship PowerShellGet v3.0.0 and the latest stable version of PSResourceGet, side-by-side.
  • We will get community feedback about the compatibility layer that will help use decide on the final plans for PowerShell v7.5.
  • We plan to ship PSResourceGet in addition to current PowerShellGet in future builds of Windows so PSResourceGet can be made available by default in Windows PowerShell 5.1.
  • We also plan to improve the experience of updating PowerShellGet/PSResourceGet in prior releases of Windows.
  • We will update the PowerShellGet repository name on GitHub to reflect the new PSResourceGet name.

Testing out the new Module

PowerShell Gallery Microsoft.PowerShell.PSResourceGet 0.5.23-beta23

Release Notes:

Install the Microsoft.PowerShell.PSResourceGet Module

Find-Module Microsoft.PowerShell.PSResourceGet
Install-Module Microsoft.PowerShell.PSResourceGet -AllowPrerelease
Get-InstalledModule Microsoft.PowerShell.PSResourceGet

List the Commands from the Module

Get- Command -Module Microsoft.PowerShell.PSResourceGet

The default Scope seems to be “CurrentUser”. You have to specify -Scope AllUsers to find Modules that are installed on the System

Get-InstalledPSResource MicrosoftTeams -Scope AllUsers
Uninstall-PSResource MicrosoftTeams -Scope AllUsers
Install-PSResource MicrosoftTeams -Scope AllUsers
Get-InstalledPSResource MicrosoftTeams -Scope AllUsers

To find a Script you have to use the Parameter -Type Script

Get-InstalledPSResource Get-Mailprotection -Scope AllUsers
Find-PSResource Get-Mailprotection -Type Script

Don’t mess with the PSResourceRepository - it will break it

Set-PSResourceRepository -Name PSGallery -Trusted:$true
Find-PSResource Get-Mailprotection -Type Script

Unregister-PSResourceRepository -Name PSGallery
Register-PSResourceRepository -PSGallery
Find-PSResource Get-Mailprotection -Type Script

Andres Bohren

PowerShell Logo