Posted on 07-28-2016 02:27 AM
Hi All,
How can I create an extension attribute where returns if a SEP client is being managed by a SEPM server or not?
Any ideas? Anything have something similar?
Thanks!
Solved! Go to Solution.
Posted on 07-28-2016 08:29 AM
#!/bin/sh
if [ -e "/Library/Application Support/Symantec/SMC/SyLink.xml" ]; then
serveraddress=`xmllint --format "/Library/Application Support/Symantec/SMC/SyLink.xml" | grep "Server Address=" | awk '{print $2}' | cut -c 10-21 | head -n 1`
fi
if [ ! -z ${serveraddress} ]; then
result="Managed ${serveraddress}"
else
result="Unmanaged"
fi
echo "<result>$result</result>"
Posted on 07-28-2016 05:13 AM
Not that I am aware of. There is a separate SEP 'admin' console to check the health and status of the SEP clients.
Posted on 07-28-2016 08:29 AM
#!/bin/sh
if [ -e "/Library/Application Support/Symantec/SMC/SyLink.xml" ]; then
serveraddress=`xmllint --format "/Library/Application Support/Symantec/SMC/SyLink.xml" | grep "Server Address=" | awk '{print $2}' | cut -c 10-21 | head -n 1`
fi
if [ ! -z ${serveraddress} ]; then
result="Managed ${serveraddress}"
else
result="Unmanaged"
fi
echo "<result>$result</result>"
Posted on 07-28-2016 10:30 AM
Thanks Michael.
That is exactly what I was looking for. I found this morning the SEPM servers are stored in SyLink.xml file and I was working on the following script, but I prefer yours:
#!/bin/bash
result="$(cat "/Library/Application Support/Symantec/SMC/SyLink.xml" | grep "ServerList" | awk '{print $22 " " $23 " " $24 " " $25 " " $26 " " $27}')"
if [ "$result" == "" ]; then
result="Client unmanaged"
fi
echo "<result>$result</result>"