Skip to content

Comments

Test-DbaKerberos - Fix Server-DC time sync for non-admin users#10075

Merged
potatoqualitee merged 1 commit intodevelopmentfrom
claude/issue-10074-20251230-1302
Jan 2, 2026
Merged

Test-DbaKerberos - Fix Server-DC time sync for non-admin users#10075
potatoqualitee merged 1 commit intodevelopmentfrom
claude/issue-10074-20251230-1302

Conversation

@potatoqualitee
Copy link
Member

Added w32tm fallback method to check time synchronization between server and domain controller without requiring Domain Administrator access or PSRemoting. This resolves the "Access is denied" error and prevents the subtraction operation error when PSRemoting fails.

  • Primary method now uses w32tm /stripchart which works without admin access
  • Falls back to Invoke-Command if w32tm is unavailable
  • Better null checking prevents subtraction errors
  • Improved error messages explain both failure scenarios

Fixes #10074

(do Test-DbaKerberos)

Added w32tm fallback method to check time synchronization between server
and domain controller without requiring Domain Administrator access or
PSRemoting. This resolves the "Access is denied" error and prevents the
subtraction operation error when PSRemoting fails.

- Primary method now uses w32tm /stripchart which works without admin access
- Falls back to Invoke-Command if w32tm is unavailable
- Better null checking prevents subtraction errors
- Improved error messages explain both failure scenarios

Fixes #10074

(do Test-DbaKerberos)

Co-authored-by: Chrissy LeMaire <[email protected]>
@andreasjordan
Copy link
Collaborator

Will test that today....

Copy link
Collaborator

@andreasjordan andreasjordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests in my local lab pass.

@potatoqualitee
Copy link
Member Author

awesome 🙌🏼

@potatoqualitee potatoqualitee merged commit 563b640 into development Jan 2, 2026
16 checks passed
@potatoqualitee potatoqualitee deleted the claude/issue-10074-20251230-1302 branch January 2, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test-DbaKerberos - Server-DC time synchronization with no Domain Administrator access to DC possible

2 participants