SHOW:
|
|
- or go back to the newest paste.
| 1 | $tested_computers = @() | |
| 2 | foreach ($computer in (Get-ADComputer -Filter '*' | Select -Expand Name)) | |
| 3 | {
| |
| 4 | - | if(Test-Connection -Cn $s -BufferSize 16 -Count 1 -ea 0 -quiet) |
| 4 | + | if(Test-Connection -Cn $computer -BufferSize 16 -Count 1 -ea 0 -quiet) |
| 5 | {
| |
| 6 | $tested_computers += $computer | |
| 7 | } | |
| 8 | } | |
| 9 | ||
| 10 | Get-WmiObject -ComputerName $tested_computers -Class Win32_NetworkAdapter | ` | |
| 11 | Where-Object { $_.Speed -ne $null -and $_.MACAddress -ne $null } | `
| |
| 12 | Format-Table -Property SystemName,Name,NetConnectionID,Speed |