I found this vbs thread...just out of curiosity, does it also display your DC when logged on with cached credentials?

 Code:
$objShell = CreateObject("Wscript.Shell")
$objEnvProcess= $objShell.Environment("PROCESS")

$strLogonServer = Right($objEnvProcess.Item("LogonServer"), -2)

? $strLogonServer

get $