Hello Wayne Evans
Welcome to Microsoft Q&A Platform, thanks for posting your query here.
If you are unable to remove a registration using the Remove-AzsRegistration
cmdlet due to the error message "The Registration resource found does not correlate to the current environment's Cloud-ID", it could be because the registration was created using a different cloud identifier than the one currently being used in your environment.
Try the below steps to see if that helps resolve your issue:
-Check the cloud identifier being used in your environment by running the following command in Azure PowerShell:
Get-AzsCloud
This will list the cloud identifier being used in your environment.
-Check the cloud identifier associated with the registration you are trying to remove by running the following command:
Get-AzsRegistration -Name <registration-name>
Replace <registration-name>
with the name of the registration you are trying to remove.
-If the cloud identifier associated with the registration is different from the one being used in your environment, you can try removing the registration using the cloud identifier associated with the registration. To do this, run the following command:
Remove-AzsRegistration -Name <registration-name> -CloudId <cloud-id>
Replace <registration-name>
with the name of the registration you are trying to remove, and <cloud-id>
with the cloud identifier associated with the registration.
I hope this helps.