The behavior you're describing points to trust relationship issues between the client machine and the domain, even though Test-ComputerSecureChannel
initially reports True
.
Test-ComputerSecureChannel
checks whether the computer account in AD can communicate securely with the domain. When you run it without -Credential
, it uses the machine account to test the secure channel. A return of True
means “the channel is working,” but it doesn't guarantee that the channel is fully healthy for all operations (especially GPO application which may require access to certain AD objects).
Some GPOs might need authentication with domain credentials to access policies, SYSVOL, or scripts. If the machine account has limited permissions, or if Kerberos tickets are stale, GPOs can fail. Using -Credential
forces the test to authenticate using a valid user account (typically a domain admin), which repairs/refreshes the secure channel properly.
Test-ComputerSecureChannel -Repair
alone repairs the secure channel using the machine account. Usually enough if the issue is minor. But in some cases, the machine account doesn't have sufficient rights, so the repair seems fine (True
), but GPO still fails. Using -Repair -Credential (Get-Credential)
provides explicit domain credentials, which:
- Re-establishes trust properly.
- Refreshes machine account permissions.
- Allows GPOs to apply correctly after
gpupdate /force
.
Some of the common reasons for this behavior include:
- Stale computer account password: Domain computer accounts change passwords automatically every 30 days. Sometimes the local machine password gets out of sync.
- Restricted access on SYSVOL/NETLOGON: The computer account cannot read the GPO.
- Replication latency or AD inconsistencies: GPO objects not yet replicated.
- Kerberos or token issues: Stale tickets can block GPO retrieval.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin