Skip to main content
Solved

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

  • July 28, 2016
  • 3 replies
  • 27 views

Forum|alt.badge.img+3

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!

Best answer by mpebley

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

3 replies

Forum|alt.badge.img+17
  • Valued Contributor
  • July 28, 2016

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


Forum|alt.badge.img+7
  • Contributor
  • Answer
  • July 28, 2016
#!/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>"

Forum|alt.badge.img+3
  • Author
  • New Contributor
  • July 28, 2016

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