From 02be18815a3141840bcd239d95234fd445fee2ff Mon Sep 17 00:00:00 2001 From: AdminDroid <49208841+admindroid-community@users.noreply.github.com> Date: Wed, 13 Sep 2023 12:02:25 +0530 Subject: [PATCH] Disable Self Service Purchase in Microsoft 365 Disable Self Service Purchase in Microsoft 365 --- .../DisableSelfServicePurchase.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Disable Self-service Purchase in M365/DisableSelfServicePurchase.ps1 b/Disable Self-service Purchase in M365/DisableSelfServicePurchase.ps1 index 8b8dbe5..19c0b69 100644 --- a/Disable Self-service Purchase in M365/DisableSelfServicePurchase.ps1 +++ b/Disable Self-service Purchase in M365/DisableSelfServicePurchase.ps1 @@ -7,7 +7,7 @@ Website: admindroid.com ===================================================================================== #> -Install-Module -Name MSCommerce -Scope CurrentUser #once you install you should remove this line +Install-Module -Name MSCommerce -RequiredVersion 1.8 -Scope CurrentUser #once you install you should remove this line Import-Module -Name MSCommerce Connect-MSCommerce #sign-in with your global or billing administrator account when prompted Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase | Where { $_.PolicyValue -eq “Enabled”} | forEach {