Query a SQL server then add the results to a Collection in Configuration Manager 2007(SCCM/ConfigMgr)

Here is a powershell script I wrote that will be run on a schedule in ConfigMgr and does the following:
1.  Removes all members of groups specified by their Collection ID
2.  Queries a remote SQL server for a listing of server names, followed by their appropriate Collection ID
3.  Adds the members to the Collections specified in the SQL database
4.  Writes to an error log for servers that are not found in SCCM
 
Here is the Script: