MSCommerce PowerShell Module 2.0 released

MSCommerce PowerShell Module 2.0 released

Hi All,

Just a few Hours ago, Microsoft has released a new Version of the MSCommerce PowerShell Module to the PowerShell Gallery.

I also noticed, that they removed all other Versions from the PowerShell Gallery

I am using the new PSResourceGet here instead of the PowerShellGet commands.

List installed Module and what’s available from the PowerShell Gallery

Get-InstalledPSResource MSCommerce -Scope AllUsers
Find-PSResource MSCommerce

Uninstall the old Module and install the new PowerShell Module

I’ve noticed that they have a dependency to MSAL.PS wich is no loger supported

Uninstall-PSResource MSCommerce -Scope AllUsers
Uninstall-PSResource MSCommerce -Scope CurrentUser
Install-PSResource MSCommerce -Scope CurrentUser
Get-InstalledPSResource MSCommerce

List the commands of the Module

Get-Command -Module MSCommerce

Connect with Microsoft 365 (Requires Global Administrator or Billing Administrator Role)

List the AllowSelfServicePurchase Settings

Connect-MSCommerce
Get-MSCommerceProductPolicies -PolicyID AllowSelfServicePurchase

Sadly it does not work in PowerShell 7

Regards
Andres Bohren

M365 Logo

PowerShell Logo