Sucessor of PowerShellGet called PSResourceGet is GA

Sucessor of PowerShellGet called PSResourceGet is GA

Hi All,

The sucessor of PoewrShellGet is called PSResourceGet is GA and the Version 1.0.0 has been released a few days ago.

To Install the new Module use the Commands below

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

List the Commands of the new Module

Get-Command -Module Microsoft.PowerShell.PSResourceGet

Set PSGallery to Trusted

Get-PSResouceRepository
Set-PSResouceRepository -Name PSGallery -Trusted
Get-PSResouceRepository

The Commands for finding Modules in PowerShell Gallery and Installed Modules are quite similar to what i am used to.

The only diffrence is that Installed Modules are searched in “CurrentUser” Scope by default. You have to specify “-Scope AllUsers” to find Installed Modules in that Scope.

#Find Modules in PowerShell Gallery
Find-PSResource Icewolf.Exchange.Mapi

#Check Installed Module
Get-InstalledPSResource Icewolf.Exchange.Mapi -Scope AllUsers
Get-InstalledPSResource Icewolf.Exchange.Mapi

Let’s check how long it takes to install the Microsoft.Graph Modules with Install-PSResource.

WOW - Installed in less than two Minutes. I am impressed!

#Install Microsoft.Graph and Microsoft.Graph.Beta Modules
$start = Get-Date
Install-PSResource Microsoft.Graph -Scope AllUsers
Install-PSResource Microsoft.Graph.Beta -Scope AllUsers
$End = Get-Date
$TimeSpan = New-TimeSpan -Start $start -End $End
$TimeSpan

Let’s uninstall the Microsoft.Graph Modules with Uninstall-PSResource.

WOW WOW WOW - Uninstallation i less than two Seconds? Now i am really impressed!

#Microsoft.Graph and Microsoft.Graph.Beta Modules
$start = Get-Date
Get-InstalledPSResource Microsoft.Graph -Scope AllUsers -ErrorAction SilentlyContinue | Uninstall-PSResource -Scope AllUsers -SkipDependencyCheck
Get-InstalledPSResource Microsoft.Graph* -Scope AllUsers -ErrorAction SilentlyContinue | Uninstall-PSResource -Scope AllUsers -SkipDependencyCheck
$End = Get-Date
$TimeSpan = New-TimeSpan -Start $start -End $End
$TimeSpan

Let’s compare that with the Classic Installation with Install-Module

#Install
$Start = Get-Date
Install-Module Microsoft.Graph
Install-Module Microsoft.Graph.Beta -AllowClobber
$End = Get-Date
$TimeSpan = New-TimeSpan -Start $start -End $End
$TimeSpan

Let’s compare that with the Classic Installation with Uninstall-Module

#Uninstall
$start = Get-Date
Get-Module Microsoft.Graph* -ListAvailable | Uninstall-Module -Force
Get-Module Microsoft.Graph -ListAvailable | Uninstall-Module -Force
$End = Get-Date
$TimeSpan = New-TimeSpan -Start $start -End $End
$TimeSpan

Comparsion

Let’s compare PowerShellGet and PSResourceGet.

Classic Time PSResourceGet Time
Install-Module 6:57 Install-PSResource 1:57
Uninstall-Module 9:38 Install-PSResource 0:1

It’s clear that the new Module performs much better. I am really impressed and love the new Module already.

Regards
Andres Bohren

PowerShell Logo