I want to convert a set of numbers to the mac address format of 00:00:00:00:00:00. I've been looking at the .net format operator, but I don't see anything.
If I wanted to convert $a = 'ba2b3cf03b2c' to the same numbers but with the colon in the middle, is there an easy way to do this? ba:2b:3c:f0:3b:2c
I tried playing with taking $a and doing this:
$a | foreach { $($_[0,1]) -join ''} That will grab the first 2 characters, and then I was going to play with adding the colon, and through trial and error, getting all the numbers to match, but there may be something a lot easier than that...I'm hoping.