Score:-1

From an Active Directory Domain Controller, how to remove a Computer from the Domain with Powershell?

au flag

I need to remove the local computer I'm logged in to an AD domain joined beforehand, and this with powershell, non-interactively.

I have not found any thread about it, so I wanted to create one to help others with a self-answered question.

au flag
@Community I don't see how the title isn't clear enough to pinpoint the problem, but I've added a sentence in the post body.
Score:-1
au flag

You just have to use the command (from the domain controller):

Remove-ADComputer <computer>

Note that the possibly misleading, similarly named command Remove-Computer is for locally leaving a domain (i.e. to be run from the computer that has to leave the domain)

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.