Skip to main content

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!

Not that I am aware of. There is a separate SEP 'admin' console to check the health and status of the SEP clients.


#!/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>"

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>"