This is the built-in help made by Microsoft for the command 'Remove-ADComputer', in PowerShell version 3 - as retrieved from
Windows version 'Microsoft Windows Server 2012 Standard' PowerShell help files on 2016-06-23.
For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.
Removes an Active Directory computer.
Remove-ADComputer [-Identity] <ADComputer> [-AuthType <ADAuthType>] [-Credential <PSCredential>] [-Partition <String>] [-Server <String>]
[-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
The Remove-ADComputer cmdlet removes an Active Directory computer.
The Identity parameter specifies the Active Directory computer to remove. You can identify a computer by its distinguished name Members (DN),
GUID, security identifier (SID), or Security Accounts Manager (SAM) account name. You can also set the Identity parameter to a computer object
variable, such as $<localComputerObject>, or you can pass a computer object through the pipeline to the Identity parameter. For example, you
can use the Get-ADComputer cmdlet to retrieve a computer object and then pass the object through the pipeline to the Remove-ADComputer cmdlet.
<
Online Version: http://go.microsoft.com/fwlink/?LinkID=219332
Add-ADComputerServiceAccount
Get-ADComputer
Get-ADComputerServiceAccount
New-ADComputer
Remove-ADComputerServiceAccount
Set-ADComputer
<
-------------------------- EXAMPLE 1 --------------------------
C:\PS>Remove-ADComputer -Identity "FABRIKAM-SRV4"
Description
-----------
Remove one particular computer.
-------------------------- EXAMPLE 2 --------------------------
C:\PS>Get-ADComputer -Filter 'Location -eq "NA/HQ/Building A"' | Remove-ADComputer
Confirm
Are you sure you want to perform this action?
Performing operation "Remove" on Target "CN=LabServer-01,CN=Computers,DC=Fabrikam,DC=com".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): a
Description
-----------
Remove all computers in a given location.
-------------------------- EXAMPLE 3 --------------------------
C:\PS>Get-ADComputer -Filter 'Location -eq "NA/HQ/Building A"' | Remove-ADComputer -confirm:$false
Description
-----------
Remove all computers from a given location and disables the confirm prompt.
-------------------------- EXAMPLE 4 --------------------------
C:\PS>Get-ADComputer "FABRIKAM-SRV4" | Remove-ADObject -Recursive
Description
-----------
Remove a computer and all leaf objects that are located underneath it in the directory. (Note that only a few computer objects create child
objects, such as servers running the Clustering service. This example can be useful for removing those objects and any child objects owned by
and associated with them.)