【发布时间】:2013-11-10 23:31:41
【问题描述】:
我正在从 Web 服务中提取数据,并希望将对象数据转换为字符串。
我正在使用:
$URI = "http://siteURL"
$Con = New-WebServiceProxy -uri $URI -namespace WebServiceProxy -class Nlyte
$WebCon= $con.GetData('Server')
$OpenCon = [xml] $WebCon
然后我查询数据:
$OpenCon.Response.Server | Where-Object {$_.AssetID -eq 8186} | Select Asset_x0020_Name
返回的数据是这样的:
Asset_x0020_Name
----------------
SERVERNAME4001
我现在怎样才能把那个对象数据变成一个字符串?
【问题讨论】:
标签: string powershell psobject