I used to be detecting which servers in our big environment are clusters or cluster nodes by checking ServicePrincipalName value of their AD objects if it is a string containing MSServerClusterMgmtAPI or MSServerCluster like this:

PS Microsoft.PowerShell.Core\FileSystem::\\tsclient\h\packages> get-adcomputer servername -properties * |select name,serviceprincipalname|ft -wrap

name     serviceprincipalname
----     --------------------
servername {MSSQLSvc/servername.ourdomain.com:BMXWEB, MSSQLSvc/servername.ourdomain.com:1433, MSServerClusterMgmtAPI/servername, MSServerClusterMgmtAPI/servername.ourdomain.com...}

There are two servers in one domain with this value in serviceprincipalname which I thought are in cluster, but now it seems like they are not, because ClusSvc Cluster Service is NOT running and no cluster role is installed. So I am not sure what these values mean and if they indicate anything. Are these servers not in cluster or were they before and it was uninstalled, but this value didn't change?

As you can see no failover cluster manager or service is there

enter image description here

  • What are you getting by executing your script? It would also be nice to provide the script. – LeRouteur Oct 7 at 8:05
  • I am sorry, it's not a script but just one command. Anybody who knows get-adcomputer can test it. But I will edit the post with some example... – Vitas Oct 7 at 13:33
  • Oh ok, my bad. Just edit and will upvote, that was a mistake from my side. – LeRouteur Oct 7 at 18:09

At some point these servers had a cluster configuration applied. I am guessing someone did not finish cleanup. If you are not using a LDAP filter with Get-ADComputer I assume your query will return disabled computer accounts. According to the documentation below computer account objects are not deleted unless you do it intentionally during cleanup. To add clarification to your question: "Does removing a failover cluster remove AD attributes from the computer object in Active Directory?" The answer is no.

| improve this answer | |
  • please clarify which objects you mean that were not cleaned up, because if I understand it right the serviceprincipalname is just an attribute of a computer object in AD, so removing of cluster service from a server does not mean that it's computer object in AD would be deleted! But reading the article it seems like those commands probably would result in updating this attribute and removing those lines about cluster... – Vitas Oct 9 at 20:18
  • The objects that were not cleaned up are the servers (computers) in Active Directory. If you use -CleanupAD parameter the Cluster configuration will be removed from the nodes (computer objects) and the cluster objects (computer objects) will be deleted from Active Directory. I opened an issue on GitHub to add clarification. – mavsafe Oct 12 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.