Param($targetfile) if($targetfile -eq $null){ Write-Host "Error: mssing url list file";exit } if(!(Test-Path $targetfile)){ Write-Host "Error: mssing url list file";exit } $urllists = Get-Content $targetfile foreach ($targeturl in $urllists) { if(($targeturl -ne "") -and ($targeturl.Substring(0,4) -eq "http")) { .\checkurl.ps1 $targeturl } } #2>&1 | Out-File -Encoding default -Append $LogFile #url_publishing.txt