PowerTip of the Day, from PowerShell.com:
If you need up-to-date exchange rates, try loading the rates via XML from the European Central Bank. This sample gets you the latest exchange rates for USD-EUR conversion. It also has a link to other currency data. Just exchange the data link. We included a sample for Danish currency as well.
#Exchangerate feeds : http://www.ecb.int/home/html/
#$url = 'http://www.ecb.int/rss/fxref-
$xml = New-Object xml
$rv = 1 | Select-Object Date, Currency, Rate, Description
$rv.Date = [DateTime]$_.Date
$rv.Description = $_.description.'#text'
$rv.Currency = $_.statistics.exchangeRate.tar
$rv.rate = $_.statistics.exchangeRate.val
And this is what the output looks like (provided you have Internet access and no proxy is required):
01.12.2011 14:15:00 USD 1.3492 1 EUR buys 1.3492 US dollar (USD) - The
30.11.2011 14:15:00 USD 1.3418 1 EUR buys 1.3418 US dollar (USD) - The
29.11.2011 14:15:00 USD 1.3336 1 EUR buys 1.3336 US dollar (USD) - The
28.11.2011 14:15:00 USD 1.3348 1 EUR buys 1.3348 US dollar (USD) - The
25.11.2011 14:15:00 USD 1.3229 1 EUR buys 1.3229 US dollar (USD) - The