I am pulling data from a web service and want to convert the object data into a string.
I am calling using:
$URI = "http://siteURL"
$Con = New-WebServiceProxy -uri $URI -namespace WebServiceProxy -class Nlyte
$WebCon= $con.GetData('Server')
$OpenCon = [xml] $WebCon
I then query the data:
$OpenCon.Response.Server | Where-Object {$_.AssetID -eq 8186} | Select Asset_x0020_Name
The data comes back as so:
Asset_x0020_Name
----------------
SERVERNAME4001
How can I now take that object data and turn into into a string?