SHOW:
|
|
- or go back to the newest paste.
| 1 | restart-computer (get-content c:\work\computers.txt) | |
| 2 | Start-Sleep -Seconds 300 | |
| 3 | get-content c:\work\computers.txt | ForEach-Object | |
| 4 | {
| |
| 5 | if(Test-Path "\\$($_)\`$ADMIN\win.ini") | |
| 6 | {
| |
| 7 | Write-Output "$($_) Online" | |
| 8 | } | |
| 9 | else | |
| 10 | {
| |
| 11 | Write-Output "$($_) Offline" | |
| 12 | } | |
| 13 | } |export-csv "C:\temp\results.csv" |