, , .
$timestampServers = @(
"http://timestamp.verisign.com/scripts/timstamp.dll",
"http://timestamp.comodoca.com/authenticode",
"http://timestamp.globalsign.com/scripts/timstamp.dll",
"http://www.startssl.com/timestamp"
)
:outer for ($retry = 2; $retry -gt 0; $retry--)
{
Write-Host retry $retry
foreach ($timestampServer in $timestampServers)
{
Write-Host timestampServer $timestampServer
if ($true)
{
break :outer
Write-Host OK
}
}
}
if ($retry -eq 0)
{
Write-Error "Digitally signing failed"
exit 1
}
:
retry 2
timestampServer http://timestamp.verisign.com/scripts/timstamp.dll
retry 1
timestampServer http://timestamp.verisign.com/scripts/timstamp.dll
C:\temp\t.ps1 : Digitally signing failed
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,t.ps1
, Write-Host OK, , , . , "".
, , ':', PowerShell :
if ($true)
{
break outer
Write-Host OK
}
.
retry 2
timestampServer http://timestamp.verisign.com/scripts/timstamp.dll
... ':'