How to convert infinity while loop to a pipeline statement
<p>I'm trying to use PowerShell pipeline for some recurring tasks and checks, like 
perform certain checks X times or skip forward after the response in pipeline will have different state.</p>

<p>The simplest script I can write to do such checks is something like this:</p>

<pre><code>do {
    $result=Update-ACMEIdentifier dns1 -ChallengeType dns-01
    if($result.Status -ne 'pending')
    { 
        "Hurray"
        break 
    }

    "Still pending"
    Start-Sleep -s 3
} while ($true)
</code></pre>

<p>The question is - how can I write this script as a single pipeline.
It looks like the only thing I need is <strong>infinity pipeline</strong> to start with:</p>

<pre><code>  1..Infinity |
    %{ Start-Sleep -Seconds 1 | Out-Null; $_ } |
    %{Update-ACMEIdentifier dns1 -ChallengeType dns-01 } |
    Select -ExpandProperty Status | ?{$_ -eq 'pending'} |
    #some code here to stop infinity producer or stop the pipeline
</code></pre>

<p>So is there any simple one-liner, which allows me to put infinity object producer on one side of the pipeline?</p>

<p>Good example of such object may be a <em>tick generator</em> that generates current timestamp into pipeline every <em>13</em> seconds</p>