$auth_token = "{PUT-YOUR-TOKEN-HERE}" $auth_key = "{PUT-YOUR-KEY-HERE}" $eval_identifier = "IBM" $eval_sharespar = "10" $eval_date = "20190302" $eval_report = "dod" $resp_data = Invoke-RestMethod -Uri ("https://api.evpsys.com/estateval/report?identifier="+$eval_identifier+"&shares="+$eval_sharespar+"&date="+$eval_date+"&report="+$eval_report+"&output=xml") -Headers @{"Authorization"="Basic "+[Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($auth_token+":"+$auth_key));} $resp_scty = $resp_data.output.report.lot.inventory " Date: "+$resp_data.output.report.'death-date' " CUSIP: "+$resp_scty.identifier " Shares/Par: "+$resp_scty.shares "------------" " Name: "+$resp_scty.name " Description: "+$resp_scty.'description-1' If ($resp_scty.price.next) { " Last Price: "+$resp_scty.price.last.date+" "+$resp_scty.price.last.high+" "+$resp_scty.price.last.low+" "+$resp_scty.price.last.type " Next Price: "+$resp_scty.price.next.date+" "+$resp_scty.price.next.high+" "+$resp_scty.price.next.low+" "+$resp_scty.price.next.type } Else { " Price: "+$resp_scty.price.last.high+" "+$resp_scty.price.last.low+" "+$resp_scty.price.last.type } " Mean: "+$resp_scty.price.mean.mean If ($resp_scty.price.mean.adjustment) { " Mean Adj: "+$resp_scty.price.mean.adjustment " Adj'ed Mean: "+$resp_scty.price.mean.total } "------------" " Accrual: "+$resp_data.output.report.lot.subtotal.accrual " Value: "+$resp_data.output.report.lot.subtotal.value "------------" " Total Value: "+$resp_data.output.report.lot.subtotal.total