Many years ago I built a quick query in SCCM which replaceed the database for a device that had a particular MAC address. It works, and it does what it needs to do and this is where I left it. It’s a pain in the ass to go into the query, edit the values and manually add the query. Time to add a user prompted value like below to enter our mac address’s in. No more editing a sccm queries. :D

It’s a simple change as well. Just replace the inverted commas with this -

##PRM:SMS_R_System.MACAddresses##

The entire script:

select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from SMS_R_System where SMS_R_System.MACAddresses = ##PRM:SMS_R_System.MACAddresses##