I want to get the MAC address. The problem is it returns the correct MAC address that i want i.e 00:04:76:DC:D6:EC but it also returns another (when the foreach loops again) 50:50:54:50:30:30. I only want the first one. Does anyone know what this second part is ?

I tryed to get round it by putting this $varible in to an array. However when i do this it adds both strings to element[0].

Is there a way to write the code below so it is not in a loop ? Or any other way to get round this problem?

can i see the rest of your code (looks intersting)? How do you create $WMIServices ... what module are you using? Please share

now as to your question, on my win2000 i got at least 10 network adapters, and I suppose most people have at least 2. I don't see this as a problem ( the first adapter in the list is probably the current in use)