Link Users and Computers based on ‘description’ field

Here is a request I got from Jim:
< If you could post your powershell script that would be great.  Another question is if we are already populating the description field
can I use that field instead of the managedby field if so how would i modify the sql? >
If you have already populated the ‘Description’ field for your computers (this field appears in ADUC, contrary to the ManagedBy field),
here is how to base your query on this field:
1. Enable the retrieval of the ‘description’ field for computers in AD system discovery.
2. Update the query to use this field: (I will consider in this example that the Description field contains the samAccountName of the user.
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,
SMS_R_SYSTEM.Client from SMS_R_System INNER JOIN SMS_R_User ON SMS_R_User.UserName =
SMS_R_System.description  where SMS_R_User.UserGroupName like “Domain\sms_application”