Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 09-08-2022 12:52 PM
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?
Solved! Go to Solution.
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 09-08-2022 01:06 PM
#!/bin/zsh
time_server=$(/usr/sbin/systemsetup -getnetworktimeserver | /usr/bin/awk '{print $NF}')
/bin/echo "<result>$time_server</result>"
Reply
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 09-08-2022 01:06 PM
#!/bin/zsh
time_server=$(/usr/sbin/systemsetup -getnetworktimeserver | /usr/bin/awk '{print $NF}')
/bin/echo "<result>$time_server</result>"
Reply
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 09-08-2022 02:24 PM
Outstanding! That works perfectly. Thank you very much!
