Check if a SEP client is being managed or not by a SEPM Server

Core_Services
New Contributor

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!

1 ACCEPTED SOLUTION

mpebley
New Contributor III
#!/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>"

View solution in original post

3 REPLIES 3

benducklow
Contributor III

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

mpebley
New Contributor III
#!/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>"

Core_Services
New Contributor

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