Board logo

标题: [原创教程] PowerShell 技能连载 - 获取美国邮政编码 [打印本页]

作者: victorwoo    时间: 2014-10-20 09:34     标题: PowerShell 技能连载 - 获取美国邮政编码

原始链接:PowerShell 技能连载 - 获取美国邮政编码
发表日期:2014-10-13


适用于 PowerShell 所有版本

是否曾需要查找某个(美国)城市的邮政编码,或者反过来通过邮政编码查找城市的名称?

只需要简单地用 PowerShell 连接到一个免费的 Web Service 就可以获得这些信息:
  1. $webservice = New-WebServiceProxy -Uri 'http://www.webservicex.net/uszip.asmx?WSDL'
  2. $webservice.GetInfoByCity('New York').Table
  3. $webservice.GetInfoByZIP('10286').Table
复制代码
本文国际来源:Getting US ZIP Codes




欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2