Pcornel
Browse topics
Options
Recent
Favorites
Command · Windows / Windows Server / PowerShell

Test-ComputerSecureChannel

Test-ComputerSecureChannel

Tests the trust between the local computer and its domain. Returns True or False.

Execution context

Administrator (elevated prompt)

Use when

A computer shows "The trust relationship between this workstation and the primary domain failed".

Then verify

Repair with Test-ComputerSecureChannel -Repair -Credential <domain\admin>.

Privilege Administrator (elevated prompt)State impact Read-onlyProduction Unknown

Operational impact: Read-only.
Command detailsSafety model · family · platform · verification · bundle
PrivilegeAdministrator (elevated prompt)
Execution contextAdministrator (elevated prompt)
State impactRead-only
Safe during productionUnknown
CategoryActive Directory
Evidence levelmixed
Primary DomainWindows
Historical technical verificationNeeds verification dateCurrent command content requires review after a Git edit.
Family Ctive Irectory
PlatformWindows / Windows Server / PowerShell
PrerequisiteAdministrator (elevated prompt)
Output fields

Field glossary

Important fields projected from persisted Command guidance.

True / False

Important persisted output field; use surrounding guidance for interpretation.

with -Verbose the domain controller used

Important persisted output field; use surrounding guidance for interpretation.

Command → Topic semantics

Used in these Topics

Each relation carries both placement role and operational semantic: verifies, configures, troubleshoots, collects evidence, changes state or general.

DomainsWindows

Find another Command

Reference enrichment

Evidence boundary

What this output can establish — and where you must not over-claim.

Proves

Shows whether the secure channel to the domain works.

Does not prove

Does not explain why it broke.

Next check

Repair with Test-ComputerSecureChannel -Repair -Credential <domain\admin>.

Depth when you need it

Command guidance

Execution context

Administrator (elevated prompt)

Use when

A computer shows "The trust relationship between this workstation and the primary domain failed".

Important fields

True / False; with -Verbose the domain controller used

Common problems

computer password out of sync with AD (restored snapshot, duplicate name)

Operational impact

Read-only.

Technical context

Without -Repair the command only tests. -Repair -Credential <admin> resets the machine password.

Confirmation

Confirm action

Continue?