"The other day I passed on a tweet I came across about creating a PowerShell prompt that displayed the domain controller that authenticated you. The original post was in a NetApp forum. Later I realized what was posted was something specific to NetApp’s PowerShell Toolkit. But you can use the same idea in a regular PowerShell session using the %LOGONSERVER% system environmental variable. "
function prompt {
#check and see if logon server is the same as the computername if ( $env:logonserver -ne "\\$env:computername" ) { #strip off the \$label = ($env:logonserver).Substring(2) $color = "Green" } else { $label = "Not Connected" $color = "gray" }
That was sort of true in the NT4 days, but no longer. It tells you the last time an RPC logon call was made to a DC. It says nothing about LDAP, Kerberos, SYSVOL, DFS, secure channels... When you have a single DC in a site, these are all the same and logonserver tells you something useful. Otherwise, ignore it.
Just so you know :-)
Make it as simple as you can, but not simpler -- Albert Einstein
That was sort of true in the NT4 days, but no longer. It tells you the last time an RPC logon call was made to a DC. It says nothing about LDAP, Kerberos, SYSVOL, DFS, secure channels... When you have a single DC in a site, these are all the same and logonserver tells you something useful. Otherwise, ignore it.
Just so you know :-)
As I sat here re-reading my post, I just knew someone was going to say that.