Posted on 07-13-2018 02:28 PM
I'm writing a script that that requires to know what office they are in without hardcoding ip etc.
Anyone know how to get the logon server? I've seen alot of ways that no longer work. The current working method I have is running: netstat | grep 63657
then pulling the data i want. Is there a cleaner method?
Posted on 07-16-2018 07:52 AM
Not sure if this helps, but it's what I use here:
"/usr/libexec/PlistBuddy" -c "print 'last used servers:/Active Directory/AD:host'" "/Library/Preferences/OpenDirectory/DynamicData/Active Directory/AD.plist" ;
"/bin/date" ;
"/usr/sbin/systemsetup" -getusingnetworktime -getnetworktimeserver ;