PowerShell Logo Small

Add-ADComputerServiceAccount



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

SYNOPSIS

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

SYNTAX


Add-ADComputerServiceAccount [-Identity] <ADComputer> [-ServiceAccount] <ADServiceAccount[]> [-AuthType <ADAuthType>] [-Credential
<PSCredential>] [-Partition <String>] [-PassThru [<SwitchParameter>]] [-Server <String>] [-Confirm [<SwitchParameter>]] [-WhatIf
[<SwitchParameter>]] [<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/?LinkID=219291
Get-ADComputer
Get-ADComputerServiceAccount
Remove-ADComputerServiceAccount

REMARKS

<

Examples


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

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



Description

-----------

Add the service account 'SvcAcct1' to a Computer Account 'ComputerAcct1'




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

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



Description

-----------

Add 2 service accounts 'SvcAcct1,SvcAcct2' to a Computer Account 'ComputerAcct1'.