I've been learning AD and also troubleshoot a problem I'm having with AD. I'd like to be able to tell if a Windows 7 workstation is actively logged on to a domain or if it's logging into an account using locally cached credentials.
To test if this works I logged into a user account on a domain named grasstree.void. Then powered off the domain controller. I then restarted my Windows 7 machine and logged into the domain. I verified that Window computeres isn't on the network. It has IP 169.254.95.63 and the AD server is powered off. I then used the following methods, which gave me result that were indistinguishable from when the AD serer was on.
Control Panel > System
Shows me on glasstree.void
C:\Users\jonnytest>whoami
glasstree\jonnytest
C:\Users\jonnytest>set logon
LOGONSERVER=MASTERCONTROLLE
C:\Users\jonnytest>gpresult /r
...shows same as when on the domain controller.
So, how can I tell if I've logged in using the domain controller, or if I've logged in using the local cache.