PowerShell Logo Small

Add-ADComputerServiceAccount



This is the built-in help made by Microsoft for the command 'Add-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

Adds one or more service accounts to an Active Directory computer.

SYNTAX


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



Search powershellhelp.space

DESCRIPTION


The Add-ADComputerServiceAccount cmdlet adds one or more computer service accounts to an Active Directory computer.


The Computer parameter specifies the Active Directory computer that will host the new service accounts. 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 Add-ADComputerServiceAccount cmdlet.


The ServiceAccount parameter specifies the service accounts to add. 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 account, use a comma-separated list.


Note: Adding a service account is a different operation than installing the service account locally.



<

RELATED LINKS

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

REMARKS

<

Examples


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

PS C:\>Add-ADComputerServiceAccount -Computer ComputerAcct1 -ServiceAccount SvcAcct1



This command adds the service account SvcAcct1 to a Computer Account ComputerAcct1.




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

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



This command adds two service accounts, SvcAcct1 and SvcAcct2, to a Computer Account ComputerAcct1.