Difference between revisions of "Reading a file"
From MyWiki
Line 10: | Line 10: | ||
$lines | | $lines | | ||
ForEach-Object{ | ForEach-Object{ | ||
− | + | Write-Host $_ | |
} | } | ||
</source> | </source> |
Revision as of 15:37, 16 June 2014
$lines=Get-Content myfile.txt $lines | ForEach-Object{ Test-Connection $_.Split(' ')[1] }
$lines=Get-Content myfile.txt $lines | ForEach-Object{ Write-Host $_ }