function Find-NextPrinterName($printerPrefix){

    if($printerPrefix -eq $null){

        $printerPrefix = Read-Host "Printer Prefix"
    }
    
    $printerNames = @()

    $printerNumber = 1
    $printerName = ''
    $hit = $true
    $domains = @('','.gsrmc.int.samhealth.net','.avery.int.samhealth.net','.sagh.int.samhealth.net','.snlh.int.samhealth.net','.slch.int.samhealth.net','.spch.int.samhealth.net')

    for ($i=0; $i -lt 5; $i++){
        while($hit -eq $true){
         $hit = $false
         $printerName = "{0}{1:d2}" -f ($printerPrefix,$printerNumber)
         Write-Progress -Activity "Searching for next printer name" -Status "($($i+1)/5) $printerName" -PercentComplete $printerNumber 
         $di = 0
          foreach ($domain in $domains){
              $printerHost = "$printerName$domain"
              $testHost = Resolve-DnsName $printerHost
              if($null -ne $testHost) { $hit = $true }
              $di++
           }

          if($hit -eq $true){ $printerNumber++ }
        }
        $printerNames += $printerName
        $printerNumber++
        $hit = $true
    }
    Write-Progress -Activity "Searching for next printer name" -Completed
    #Write-Host "$printerName"
    return $printerNames

}