I am trying to take a Windows Server DHCP log and be able to extract specific fields from it like IP Address, MAC Address etc. and write this data to another file. However when I read the log with Powershell after converting to csv the log is not listing the fields. In the actual csv opened with Excel the fields are there. I also tried using Get-Content and assigning the results to a variable and piping to GM but that did not list any members of the csv file. Please include specific code examples.
How can I accomplish this?