# My little contribution to this amazing comunity

**URL:** <https://forums.powershell.org/t/my-little-contribution-to-this-amazing-comunity/9215>\
**Category:** PowerShell Help\
**Created:** [August 22, 2017, 2:37am UTC](https://forums.powershell.org/t/my-little-contribution-to-this-amazing-comunity/9215 "2017-08-22T02:37:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomosrider](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@tomosrider](https://forums.powershell.org/u/tomosrider)\
**Post date:** [August 22, 2017, 2:37am UTC](https://forums.powershell.org/t/my-little-contribution-to-this-amazing-comunity/9215/1 "2017-08-22T02:37:41Z")

</div>

Hello all, i’m on this forum for a while and i find it amazing resource pool for almost anything i can image for creating useful tools and scripts.  
To cut the story short, i decided to share my humble script if anybody finds it helpful. I know i did…🙂  
Script is simple, it gets date and creates folder for that date and then copies from source to destination.  
It gets list of computers from text file, then proceeds to list all filtered content(in this case, i needed folders with exact part of the name)  
As i said, simple but thats what PS is all about, right? Make it simple, guys! Cheers

```
$today = Get-Date -Format "dd-MM-yyyy"
$computers = Get-Content "C:\computers.txt"
$folders = gci "\\$computers\D\*" -Directory -Filter *filter names of folders* 

Foreach ($computer in $computers){

        if(!(Test-Path -path "c:\test\$computer"))
        {
            New-Item -ItemType directory -path "c:\test\$today\$computer" 
            
        }

     
    
        Copy-Item $folders -Destination "c:\test\$today\$computer" -Recurse
        }
```

---

<div class="post-metadata">

**Author:** ![js2010](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@js2010](https://forums.powershell.org/u/js2010)\
**Post date:** [August 24, 2017, 1:30pm UTC](https://forums.powershell.org/t/my-little-contribution-to-this-amazing-comunity/9215/2 "2017-08-24T13:30:07Z")

</div>

How you like this one?

```
Function Get-Arp
{
    arp -a | select -skip 3 | foreach {
        $ip,$mac,$type = -split $_
        New-Object -Type PSObject -Property @{
            InternetAddress = $ip
            PhysicalAddress = $mac
            Type = $type
            HostName = (resolve-dnsname -DnsOnly -ErrorAction SilentlyContinue $ip).NameHost
        }
    }
}
```

---

<div class="post-metadata">

**Author:** ![tomosrider](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@tomosrider](https://forums.powershell.org/u/tomosrider)\
**Post date:** [August 25, 2017, 7:55am UTC](https://forums.powershell.org/t/my-little-contribution-to-this-amazing-comunity/9215/3 "2017-08-25T07:55:28Z")

</div>

Noooice!

---

<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:37pm UTC](https://forums.powershell.org/t/my-little-contribution-to-this-amazing-comunity/9215/4 "2024-05-16T20:37:42Z")

</div>

Closed on May 16, 2024, 8:37pm UTC


