Powershell içinden anlık döviz kur bilgilerini alın

Powershell ile anlık döviz kur bilgilerini alabileceğiniz kullanışlı bir script daha. Doviz.ps1 ismiyle kaydedip powershell icinden .\doviz.ps1 komutu ile çalıştırabilirsiniz.

function doviz(){

$iekur = new-object -com “InternetExplorer.Application”

$iekur.navigate(“http://kur.doviz.com/serbest-piyasa/amerikan-dolari”)

start-sleep -s 3

$sonucdolar=$iekur.Document.title

$iekur.navigate(“http://kur.doviz.com/serbest-piyasa/euro”)

start-sleep -s 3

$sonuceuro=$iekur.Document.title

$iekur.navigate(“http://kur.doviz.com/serbest-piyasa/sterlin”)

start-sleep -s 3

$sonucsterlin=$iekur.Document.title

write-host $sonucdolar -foregroundcolor “Green”    

write-host $sonuceuro -foregroundcolor “Green”    

write-host $sonucsterlin -foregroundcolor “Green”    

$iekur.quit()

}

Doviz

 

Teşekkürler,

BakiOnur

Leave a Reply