Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- restart-computer (get-content c:\work\computers.txt)
- Start-Sleep -Seconds 300
- get-content c:\work\computers.txt | ForEach-Object
- {
- if(Test-Path "\\$($_)\`$ADMIN\win.ini")
- {
- Write-Output "$($_) Online"
- }
- else
- {
- Write-Output "$($_) Offline"
- }
- } |export-csv "C:\temp\results.csv"
Add Comment
Please, Sign In to add comment