Hi, welcome to the video. In this video, we are going to teach you how to do a metadata clean up on a domain. Uh You'll want to do this if there is a DC or multiple DCS that have been taken out of the domain improperly, whether that's being reinstalled, just taken out of the network powered down, whatever without demoting it first. The easy way to do this is a right click and delete and that is gonna be going to active directory users and computers going to your domain domain controllers, finding the domain. That is the problem. In this case, it's gonna be DC two, right click, delete. It's gonna ask if you're sure you wanna do it. Click. Yes.
It'll say, hey, this is a domain controller. Are you sure you wanna go ahead and delete it? You'll hit, yes, or you'll hit, hit the check box and then delete and then we'll say, hey, this domain controller is a global catalog. Do you want to continue with the deletion? Click? Yes, it'll delete it there. Then you want to go to active directory sites and services, go to sites, whichever site the domain controller was part of servers. And as you can see, it doesn't have any of the information left, but it's still in there. So we just wanna highlight it, delete it and click. Yes. And it's gone. Now, there are some cases where that will not work and you'll have to do it the hard way. And once I reset the lab, we'll go ahead and go over that. All right.
Now that we've got the lab re set, we have two DCS again, which I'll show you we'll go to the domain controllers. And as you can see that Pesky DC is back. So now we're gonna go ahead and open up an administrator command prompt. We're gonna go to NT DS UT. Once there, we're gonna go to metadata cleanup, we got the space and once we're there, we're gonna go through the connections and we're going to connect to the server and then it's gonna be whichever DC you're wanting to connect to. In this case, it's gonna be DC one. Once we're there, we're gonna go ahead and quit, go back to metadata cleaning.
Then we're gonna go to select operation target in there. We're going to list domains, OK? It sees one domain in a multi domain environment. Of course, you'll see all of them will just want to select domain and then whichever nber you're on. So in this case, it would be zero. OK? And as you can see it's saying no current site, no current server. So we're going to list sites in a multisite environment. You need to pick whichever one you have. But here it's just select sight zero. Now it's got the site but no server. So we're going to list servers in sight. And as you can see, it's got both of them DC one and DC two. We're going to select server one since we are wanting to get rid of DC two.
And then once everything is listed, we're gonna go ahead and hit Q again and then we're going to renew selected server, it'll pop up saying that you making sure that you want to do it. And here you want to make sure that you have the proper DC as the CN. If it is correct, you'll just hit, yes, it'll remove it. Then you can just click out of it. Hit the yes, exit the command prompt. And now we'll go ahead and do a refresh. As you can see, we've only got the one DC in there now. And as in the right click method, you'll still wanna go to sites and services the site servers and delete it there as well. And that is how you do a metadata cleanup both the easy right click delete way and the hard command prompt, NT DS ut way. Hope you've enjoyed.
And thank you for watching.