Powershell Tip #6: Create an infinite loop By powershellgu | July 10, 2015 2 Comments 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}
Pingback: Powershell Tip #5: Automatic variable ($PSBoundParameters) | Powershell Guru
Pingback: Powershell Tip #7: Convert WMI date to Datetime | Powershell Guru