This script by Don Hite will detect SCCM Site servers role on a remote machine, and send it to Excell. The script will get the Role name from WMI (SMS_SystemResourceList) and add it to Excell
Here it is:
http://myitforum.com/cs2/blogs/dhite/archive/2009/06/06/vbs-script-to-send-a-specified-site-servers-roles-to-excel.aspx