Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $txtfile = "C:\temp\test\" + "$env:COMPUTERNAME" + ".log"
- if((Test-Path -Path $txtfile -PathType Leaf) -eq $true){ Remove-Item -Path $txtfile -ErrorAction SilentlyContinue ; sleep 1 }
- $newDate = (get-date).AddMinutes(1).ToString("HH:mm")
- (New-TimeSpan -End "$newDate").TotalSeconds | Sleep;
- $netTest = ping 8.8.8.8
- $netTest2 = ipconfig /all
- $netTest3 = Test-NetConnection
- Add-Content $txtFile $netTest
- Add-Content $txtFile $netTest2
- Add-Content $txtFile $netTest3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement