Powershell disable azure subscription

I'm very new to PowerShell, and I was wondering if it is possible to disable an azure subscription through Powershell, I can't find any documentation online. any working examples or referral to documentation would be a helpful start.


Short answer is, No.

Azure account cannot be disable, except by Microsoft for things like overage and nonpayment.

Also, most billing changes cannot be done using PowerShell.

If this is something that you see a use case for you can always leave a feedback

https://feedback.azure.com/forums/170030-signup-and-billing


Look at here: https://docs.microsoft.com/en-us/powershell/module/az.subscription/update-azsubscription?view=azps-4.8.0

This cmdlet is part of this Module: https://www.powershellgallery.com/packages/Az.Subscription/0.7.1-preview

This command will cancel a Subscription:

Update-AzSubscription -SubscriptionId "86869d42-1782-4337-98b0-c905fb937d46" -Action "Cancel"

The allowed Values for the Parameter -action are missing. Bad documented by Microsoft! :-(