Skip to main content

SYNOPSIS

Disables self-service purchase for ALL products in Microsoft 365.

SYNTAX

Disable-MSSelfServicePurchase [-Force] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

This function connects to the Microsoft Commerce service and disables the self-service purchase option for all products that currently have it enabled. This is useful for organizations that want to prevent users from purchasing additional services or products on their own.

EXAMPLES

EXAMPLE 1

Disable-MSSelfServicePurchase
Disables self-service purchase for all products in the Microsoft 365 tenant, prompting for confirmation for each product.

EXAMPLE 2

Disable-MSSelfServicePurchase -Force
Disables self-service purchase for all products without prompting for confirmation.

PARAMETERS

-Force

Skips confirmation prompts and disables self-service purchase for all products without asking.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

https://ps365.clidsys.com/docs/commands/Disable-MSSelfServicePurchase