Try the following (I'm sure you've done most of this, but perhaps you missed a step):
- Log in to the Azure portal (https://manage.windowsazure.com) and navigate to ACTIVE DIRECTORY.
- Choose the directory that you aren't able to access via PowerShell and click ADD USER.
- Under 'TYPE OF USER', choose 'New user in your organization' and choose a username, under the initial domain (e.g. admin@contoso.onmicrosoft.com).
- Fill out the next page, and make sure you assign the role of 'Global Administrator'. Make sure you copy the password in the last step.
- Once the user is created, you need to reset the password. An easy way is to start a new browser session and navigate to https://portal.microsoftonline.com. You'll be prompted to reset the password.
- Now go to PowerShell and try
Connect-MsolService
using the new user account you just created. You should now be able to remove all objects.
A few notes:
- Even if you are able to add a Microsoft Account (MSA) to your directory via the Azure portal, there is currently no support for using the user account for anything else, including PowerShell.
- Every directory has an initial domain which ends in in '.onmicrosoft.com'.
- You won't be able to remove a domain if there are any users using that domain. If this is not the case, you can remove the domain using the Azure portal ('DOMAINS' section) and simply forget about that directory.
- As @Rick Rainey said, you can't currently remove a directory, but you can leave it empty.
- Currently, DirSync is a one-way sync where everything is mastered on-premises.