ortsingle.psm1

function ortsingle{

  param(
  [Parameter(Mandatory=$true)]  
  [string]$client)
  $path = "D:\DAILYTASK\$($client)"
  Write-host $path -f Red
  $files = Get-ChildItem $path | Where-Object {$_.Extension -eq ".html"}
  
  foreach($file in $files){
  $filepath = $file.FullName
  $filename = $file.Name
  
  $output = $filepath -replace ".html",".pdf"
  
  
  Write-host $filename -f Green
  
  & "D:\wkhtmltopdf\bin\wkhtmltopdf.exe" --page-size A4 --log-level error $filepath $output
  
  }
  
  
  }