我是新來的PowerShell,我試圖找出如何保存(到文件或數據庫)由以下Web服務返回的對象:如何保存Web服務返回的對象?
$apiKey = "00000000-1111-2222-3333-444444444444"
$userName = "12345678"
$password = "SamplePassword"
$URI = "https://www.example.com/api/TestWS.TestService.svc?wsdl"
$prox = New-WebServiceProxy -uri $URI -namespace WebServiceProxy
$prox.chambersList
$prox.chambersList($userName, $password, $apiKey, 0, $false, 0, $false)
---------------------------------------------------------------------
MemberType : Method
OverloadDefinitions : {WebServiceProxy.chambersListOutputData, ijfah16c, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null chambersList(string userName, string password, string apiKey, System.Nullable[int] pageNumber, bool pageNumberSpecified, System.Nullable[int] pageSize, bool pageSizeSpecified)}
TypeNameOfValue : System.Management.Automation.PSMethod
Value : WebServiceProxy.chambersListOutputData, ijfah16c, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null chambersList(string userName, string password, string apiKey, System.Nullable[int] pageNumber, bool pageNumberSpecified, System.Nullable[int] pageSize, bool pageSizeSpecified)
Name : chambersList
IsInstance : True
chambersList : {797, 798, 799, 800...}
pagesCount : 92
pagesCountSpecified : True
allElementsCount : 918
allElementsCountSpecified : True
pageNumber : 1
pageNumberSpecified : True
pageSize : 10
pageSizeSpecified : True
description : OK
code : OK
codeSpecified : True
information :
我想引用一個名爲「方法chambersList「,但我無法理解它是如何工作的。是否可以將返回的對象(List?,Table?)導出到XML/CSV/TXT /數據庫?我怎樣才能做到這一點?