Use this topic for computer-account identity, join state, secure-channel reasoning, SPN ownership and directory-side machine troubleshooting.
Computers
A domain-joined Windows machine has a computer account with a SID and machine password used to maintain a secure relationship with the domain. The object can also hold SPNs and management attributes.
1. Get-ADComputer <c> -Properties Enabled,LastLogonDate,OperatingSystem.
2. Secure channel: Test-ComputerSecureChannel -Repair on the client.
3. OU for GPOs.
4. Stale computers cleanup.
5. LAPS attributes.
computer account → secure channel → GPOs
Test the specific service authentication or compare directory replicas if the symptom is DC-dependent.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Do not use delete/recreate/rejoin as the first move. It changes multiple state variables and can destroy evidence about DNS, time, replication or credential mismatch.
Operational reference
Fast context before you go deeper.
Get-ADComputer <name> -Properties *Primary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
Verify the computer object on a known DC, then test the client’s domain secure channel and the actual service/authentication workflow. Compare DCs only when stale replicated state is suspected.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Computer object existence does not prove the machine currently has a healthy domain secure channel.
- The machine account has credentials that change independently of human user passwords.
- Duplicate/incorrect SPNs can create authentication problems even when the computer object exists.
- Deleting/rejoining is not the first diagnostic step for a suspected trust relationship failure.
Get-ADDomain— domain details and FSMO holdersGet-ADDomainController -Filter * | Select HostName,Site,IsGlobalCatalog— DCsdcdiag /v /e /q— DC health tests (errors only with /q)repadmin /replsummary— replication summarynltest /dsgetdc:<domain>— DC locator
ReferenceWhat it is1 section · depth on demand
Core model
Computer accounts are active security principals, not inventory placeholders. Their relationship with the domain depends on DNS, DC location, time and matching machine-account credential state.
ReferenceImportant terms & boundaries2 sections · depth on demand
What the evidence shows
For trust failures, capture client name/domain, selected DC, time, DNS, computer SID and secure-channel result before resetting the account or rejoining the machine.
In depth
Computer accounts authenticate machines with a password rotated automatically every 30 days.
Get-ADComputer srv01 -Properties OperatingSystem,LastLogonDate,PasswordLastSet,ServicePrincipalName
Test-ComputerSecureChannel -Verbose
Test-ComputerSecureChannel -Repair -Credential (Get-Credential)
Reset-ComputerMachinePassword -Server dc01
nltest /sc_verify:corp.example.com
Broken secure channels ("The trust relationship between this workstation and the primary domain failed") come from VM snapshot reverts, duplicate names or restored images — repair rather than rejoin when possible. Restrict who can join computers (default: any user can join 10 — set ms-DS-MachineAccountQuota to 0).
ReferenceConfiguration & state1 section · depth on demand
Computer account commands
Get-ADComputer pc01 -Properties LastLogonDate,OperatingSystem,PasswordLastSet
Test-ComputerSecureChannel -Verbose
Test-ComputerSecureChannel -Repair -Credential EXAMPLE\admin
Reset-ComputerMachinePassword -Credential EXAMPLE\admin
Documented example, not captured output. "The trust relationship between this workstation and the primary domain failed" means a broken machine password (often after restoring an old snapshot); repair the secure channel instead of rejoining.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Active Directory Domain Services → Computers. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/ · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Active Directory Domain Services → Computers reference map
Fast lookup boundaries for Active Directory Domain Services → Computers.
| Boundary | Meaning | Evidence limit |
|---|---|---|
| Computer object | Directory identity | not host reachability |
| Machine password | Secure-channel credential | independent lifecycle |
| SPN | Service identity mapping | duplicates can break Kerberos |
| Secure channel | Machine↔domain relationship | depends on DNS/time/DC |