Like you were saying Richard, you never know which mac that will return. I need to return all macs that have IP Enabled. So I'm still going to need my WMI query in there. But at least I should be able to use Lonkero's way of writing to the file.

Which also means I'm still going to need to trim the MAC value returned from the WMI query like I do in my original vb script. The MAC comes back like this from the WMI query XX:XX:XX:XX:XX:XX.