New Microsoft PowerShell module MSCommerce, but there is a catch!
On Oct 21, 2019, Microsoft announced the intent to allow the self-service purchase of the Power Apps platform (PowerBI Pro, Power Apps, and Power Automate). You can read about it at Tony Redmond's blog site Petri, link here.
Nov 16, 2019, Microsoft released MSCommerce PowerShell module on
PowerShell Gallery in response to customer feedback. The majority of the feedback was the capability to disable the 'NEW' feature within their Office 365 tenant.
When an admin runs Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase for the first time, some are receiving the following error message.
Reading Microsoft's TechNet article User AllowServicePurchase for the MSCommerce PowerShell module under the Troubleshooting we find that this is an expected error.
An expected error?
Yes, the module only supports TLS 1.2.
Microsoft's recommended solution is to upgrade to TLS 1.2.
Unfortunately not all admins are lucky enough to only manage systems that support TLS 1.2, but instead, need TLS 1.0 and TLS 1.1 for backward compatibility to legacy systems. If you are an admin with such a scenario; the code below is what you need. While you work through the process of upgrading to TLS 1.2.
You may also view the code on GitHub.
Results Below is a screenshot of the code running successfully.