views:

17

answers:

0

I've written a C# automation utility that we're using to add Windows 7 workstations. For various reasons, we occasionally get a PC that will "think" it joined the domain, but actually failed. When logging in with a domain account, the W7 will show "The trust relationship between this workstation and the primary domain failed"

What I'd like to do is write a piece of code that would detect if the PC has a good trust relationship with the domain. Is there a eventlog, test, etc that I could code against?