# encoding: ascii
# api: powershell
# title: Get Stock Quotes
# description: Get-StockQuotes gives a very easy way to get stock quotes using PowerShell CTP3’s new Web Services capabilities.
# version: 0.1
# type: function
# author: Carter Shanklin
# license: CC0
# function: Get-StockQuote
# x-poshcode-id: 752
# x-archived: 2015-05-05T05:42:05
# x-published: 2009-12-27T00:34:00
#
#
function Get-StockQuote {
param($symbols)
process {
$s = new-webserviceproxy -uri http://www.webservicex.net/stockquote.asmx
foreach ($symbol in $symbols) {
$result = [xml]$s.GetQuote($symbol)
$result.StockQuotes.Stock
}
}
}
# Example:
# Get-StockQuote VMW, EMC | select Symbol, Last