# Formatting data from multiple jobs

**URL:** https://forums.powershell.org/t/formatting-data-from-multiple-jobs/3458
**Category:** PowerShell Help
**Created:** [November 25, 2014, 8:47pm UTC](https://forums.powershell.org/t/formatting-data-from-multiple-jobs/3458 "2014-11-25T20:47:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![nathaniel-toney](https://avatars.discourse-cdn.com/v4/letter/n/58956e/32.png) [@nathaniel-toney](https://forums.powershell.org/u/nathaniel-toney)
#### Post date: [November 25, 2014, 8:47pm UTC](https://forums.powershell.org/t/formatting-data-from-multiple-jobs/3458/1 "2014-11-25T20:47:56Z")

</div>

Hi guys,

Quick question.

If I’m running jobs that return an array of MAC addresses, how would I add a column of hostnames from a text file that it’s getting content from to match the MACs?

Can’t seem to figure this one out. If you need a sample of my script I’ll add it soon, going to lunch right now.

Thanks for your help.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)
#### Post date: [November 25, 2014, 11:32pm UTC](https://forums.powershell.org/t/formatting-data-from-multiple-jobs/3458/2 "2014-11-25T23:32:05Z")

</div>

What’s in your text file now, hostnames or MAC addresses? If you’re reading one and looking up the other, then you just need to build an object that has both properties. Something along these lines (assuming a fake function called Get-MacAddress is doing the work of turning a hostname into a MAC):

```
Get-Content hostnames.txt |
ForEach-Object {
    New-Object psobject -Property @{
        ComputerName = $_
        MacAddress = Get-MacAddress -ComputerName $_
    }
}
```

---

<div class="post-metadata">

### Author: ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)
#### Post date: [May 16, 2024, 8:46pm UTC](https://forums.powershell.org/t/formatting-data-from-multiple-jobs/3458/3 "2024-05-16T20:46:41Z")

</div>


