Dressurausbildung Daniel Köck

Dresssurausbildung Koeck

Stern inaktivStern inaktivStern inaktivStern inaktivStern inaktiv
 

So deaktivieren Sie Self-Service-Käufe im Microsoft 365 Admin Center

 

Öffnen Sie das Microsoft 365 Admin Center

 Klicken Sie auf das Dropdown-Menü "Einstellungen" und wählen Sie 'Org-Einstellungen'

Scrollen Sie nach unten zu Self-Service-Testversionen und -Käufe.

Klicken Sie Microsoft Teams Premium

Wählen Sie Do not allow

Speichern 

 

Teams Premium

 

Deaktivieren von Self-Service-Käufen für Microsoft Teams Premium über PowerShell

 

# Check if MSCommerce module is installed
if (-not (Get-Module -ListAvailable -Name MSCommerce)) {
Install-Module -Name MSCommerce -Scope CurrentUser -Force
}

# Import the module
Import-Module MSCommerce

# Connect to MSCommerce
Connect-MSCommerce

# Check current policy
Get-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0RM8K

# Update policy to disable self-service purchase
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0RM8K -Enabled $False

 

Deaktivieren von Self-Service-Käufen für alle Microsoft 365-Dienste über PowerShell

 

# Ensure MSCommerce module is installed and imported
if (-not (Get-Module -ListAvailable -Name MSCommerce)) {
Install-Module -Name MSCommerce -Scope CurrentUser -Force
}
Import-Module MSCommerce

# Connect to MSCommerce
Connect-MSCommerce

# Get all product policies for AllowSelfServicePurchase
$policies = Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase

# Disable self-service purchase for all products where it is enabled
$policies | Where-Object { $_.PolicyValue -eq "Enabled" } | ForEach-Object {
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId $_.ProductID -Enabled $false
Write-Host "Disabled self-service purchase for Product: $($_.ProductName) ($($_.ProductID))" -ForegroundColor Green
}

Write-Host "Self-service purchase has been disabled for all applicable Microsoft products." -ForegroundColor Cyan

Copyright © winxperts4all.com. All Rights Reserved.