PowerShell Logo Small

Remove-ADComputerServiceAccount



This is the built-in help made by Microsoft for the command 'Remove-ADComputerServiceAccount', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 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.

SYNOPSIS

Removes one or more service accounts from a computer.

SYNTAX


Remove-ADComputerServiceAccount [-Identity] <ADComputer> [-ServiceAccount] <ADServiceAccount[]> [-AuthType {Negotiate | Basic}] [-Credential <PSCredential>] [-Partition
<String>] [-PassThru] [-Server <String>] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Remove-ADComputerServiceAccount cmdlet removes service accounts from an Active Directory computer.


The Computer parameter specifies the Active Directory computer that contains the service accounts to remove. You can identify a computer by its distinguished name (DN),
GUID, security identifier (SID) or Security Accounts Manager (SAM) account name. You can also set the Computer parameter to a computer object variable, such as
$<localComputerobject>, or pass a computer object through the pipeline to the Computer 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-ADComputerServiceAccount cmdlet.


The ServiceAccount parameter specifies the service accounts to remove. You can identify a service account by its distinguished name (DN), GUID, security identifier (SID) or
security accounts manager (SAM) account name. You can also specify service account object variables, such as $<localServiceAccountObject>. If you are specifying more than
one service account, use a comma-separated list.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=291084
Add-ADComputerServiceAccount
Get-ADComputer

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

PS C:\>Remove-ADComputerServiceAccount -Computer ComputerAcct1 -serviceAccount SvcAcct1



This command removes a service account SvcAcct1 from a Computer Account ComputerAcct1.




-------------------------- EXAMPLE 2 --------------------------

PS C:\>Remove-ADComputerServiceAccount -Computer ComputerAcct1 -ServiceAccount SvcAcct1,SvcAcct2



This command removes service accounts SvcAcct1 and SvcAcct2 from a Computer Account ComputerAcct1.