Powershell Tip #6: Create an infinite loop By powershellgu | July 10, 2015 0 Comment Tip: You can create an endless loop using while or for : PowerShell # Solution 1 while ($true) { Test-Connection -ComputerName $computer -Quiet } # Solution 2 for ( ; ; ) { Test-Connection -ComputerName $computer -Quiet } 12345678910111213 # Solution 1 while ($true){ Test-Connection -ComputerName $computer -Quiet} # Solution 2 for ( ; ; ){ Test-Connection -ComputerName $computer -Quiet}