Skip to content

Instantly share code, notes, and snippets.

@neilmartin83
Created September 26, 2017 04:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neilmartin83/f564f5bf45bc19b3f244825294a0d586 to your computer and use it in GitHub Desktop.
Save neilmartin83/f564f5bf45bc19b3f244825294a0d586 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Gathers Microsoft System Center Endpoint Protection Virus Def last update date
data='/Library/Application Support/Microsoft/scep/modules/data/data.txt'
if [ -f "$data" ]
then
unixdate=`grep -A 1 "LastUpdate=" "$data" | grep "LastUpdate=" | cut -d "=" -f 2`
realdate=`date -r $unixdate "+%Y-%m-%d %H:%M:%S"`
echo "<result>$realdate</result>"
else
echo "<result>Not Installed</result>"
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment