I'm able to fill a datatable, $devices from a MySql query (for example):
PS C:\Users\MKANET\Desktop\dev\lab> $devices.table[10]
name ip mac vendor
---- -- --- ------
ComputerTest 10.51.18.6 fd1969ff4cb9 HewlettP
I'd like to convert that datatable type into a custom PSObject; where, the mac column is converted to PSObject NoteProperty name "Mac-Address"; and, respective values converted to 00-00-00-00 string format:
PS C:\Users\MKANET\Desktop\dev\lab> $devices[1]
name ip MAC-Address vendor
------- -- ----------- ------------
ComputerTest 10.51.18.6 fd-19-69-ff-4c-b9 HewlettP
Considering these datatables may be relatively large (may have a couple hundred rows), I need the fastest processing method to do this in Powershell.
If it'll make the converting/modifying process significantly faster, I'd be happy with keeping $Devices as a Datatable; only modifying/processing the values for the "mac" column to: 00-00-00-00-00-00 text format, permanently.