mcamero Posted April 24, 2015 Report post Posted April 24, 2015 Hello all, First post and totally NOOB here! I'm currently using the query below to find the LAN MAC address by entering the computer name in a prompted value. select distinct SMS_R_System.MACAddresses, SMS_R_System.Name from SMS_R_System where SMS_R_System.Name = ##PRM:SMS_R_System.Name## order by SMS_R_System.Name Is it even possible, and if so I'm hoping someone can help me figure out how to, query to find all MACs using the computer name in a prompted value? Currently if I run the query on a laptop, it will not return the wireless MAC and this is what I'm looking for. Also, I have seen ways of running such queries but they do not differentiate between which MAC is which. Would it be better to write a script in PowerShell for this task? Thank you! Quote Share this post Link to post Share on other sites More sharing options...
Peter van der Woude Posted April 24, 2015 Report post Posted April 24, 2015 Switch the .Name and the MACAddresses around and you should be close Quote Share this post Link to post Share on other sites More sharing options...
mcamero Posted April 24, 2015 Report post Posted April 24, 2015 I do already have the query below: select distinct SMS_R_System.Name, SMS_R_System.MACAddresses from SMS_R_System where SMS_R_System.MACAddresses = ##PRM:SMS_R_System.MACAddresses## order by SMS_R_System.MACAddresses I believe this is what you were referencing. This allows me to obtain a computer name if I only have the MAC. What I'm looking for is if I have the computer name and I want to find the MAC address, however on laptops there are multiple MACs so I'd like to get all of the MACs (or more specifically the Ethernet and Wireless) and I'd like them differentiated so I know which is which. Thank you for the response! Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted April 24, 2015 Report post Posted April 24, 2015 It is because you are querying the wrong thing. You query will tell you the MAC address of your clients, not of all of the MAC on the system. Instead you want SMS_G_System_NETWORK_ADAPTER.MACAddress to get all of the MAC address. Quote Share this post Link to post Share on other sites More sharing options...
mcamero Posted July 14, 2015 Report post Posted July 14, 2015 select distinct SMS_G_System_NETWORK_ADAPTER.MACAddress, SMS_R_System.Name from SMS_R_System where SMS_R_System.Name = ##PRM:SMS_R_System.Name## order by SMS_R_System.Name Sorry for the late reply... I had to put this off due to more pressing issues. So the code above is what I have now for my query, but this doesn't pull up any MACs for a system at all. Again, my main goal here is to be able to enter a prompted value of Computer Name and get results of Ethernet Adapter Local Area Connection MAC address, as well as, Wireless LAN Adapter MAC Address. Thank you all again for your help! Quote Share this post Link to post Share on other sites More sharing options...