I'm trying to create an extension attribute to show what time server is configured on our Macs. This should make it easier to show an auditor that we manage the time server on endpoints. Does anyone know of a terminal command that would output a machine's time server?
Page 1 / 1
#!/bin/zsh
time_server=$(/usr/sbin/systemsetup -getnetworktimeserver | /usr/bin/awk '{print $NF}')
/bin/echo "<result>$time_server</result>"
Outstanding! That works perfectly. Thank you very much!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.