anonymous user, There is no way you can create or delete a tenant in programmatic way like using a Powershell script.
You can create, modify and delete a domain under a tenant using PS cmdlets, which you can find here.
Hope this helps.
---------------------------------------------------------------------------------------------------------------------------------------
Please take a moment to "Mark as Answer" and/or "Vote as Helpful" wherever applicable. Thanks!