PowerShell Logo Small

Get-ADComputerServiceAccount



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

Gets the service accounts hosted by a computer.

SYNTAX


Get-ADComputerServiceAccount [-Identity] <ADComputer> [-AuthType {Negotiate | Basic}] [-Credential <PSCredential>] [-Partition <String>] [-Server <String>]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Get-ADComputerServiceAccount cmdlet gets all of the service accounts that are hosted by the specified computer.


The Computer parameter specifies the Active Directory computer that hosts the 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 Get-ADComputerServiceAccount cmdlet.



<

RELATED LINKS

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

REMARKS

<

Examples


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

PS C:\>Get-ADComputerServiceAccount -Identity ComputerAcct1
Enabled : True
Name : SvcAcct1
UserPrincipalName :
SamAccountName : SvcAcct1$
ObjectClass : msDS-ManagedServiceAccount
SID : S-1-5-21-159507390-2980359153-3438059098-1104
ObjectGUID : 8d759d66-ef68-4360-aff6-ec3bb3425ac1
HostComputers : {CN=ComputerAcct1,CN=Computers,DC=contoso,DC=com}
DistinguishedName : CN=SvcAcct1,CN=Managed Service Accounts,DC=contoso,DC=com



This command gets the service accounts hosted on a computer account ComputerAcct1.