If you would like to get currency exchange rates, you can simply access a Web service from one of the major banks. Here is how to get the USD exchange rate:
$xml = New-Object xml
$xml.Load('http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml')
$rates = $xml.Envelope.Cube.Cube.Cube
"Current USD exchange rate:"
$usd = $rates | Where-Object { $_.currency -eq 'USD' } |
Select-Object -ExpandProperty rate
$usd
$xml.Load('http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml')
$rates = $xml.Envelope.Cube.Cube.Cube
"Current USD exchange rate:"
$usd = $rates | Where-Object { $_.currency -eq 'USD' } |
Select-Object -ExpandProperty rate
$usd