param(
[string]$cFilename="TaxBill-2021-",[string]$cPROPERTYKEY="0"
)

#Specify variables and pass parameters and specify format of report PDF (to keep things simple)
$url = "http://matrix-pc/ReportServer/Pages/ReportViewer.aspx?/GATCSReports/TAXBILL&ReportSvr=MATRIX-PC&ReportDB=DY2021&PROPERTYKEY="+$cPROPERTYKEY+"&rs:Format=PDF"

$webclient = New-Object System.Net.WebClient
$webclient.UseDefaultCredentials = $TRUE

$file = "C:\gatcs\exports\DY2021\taxbill_pdf\"+$cFilename+$cPROPERTYKEY+".pdf"
$webclient.DownloadFile($url,$file)
