私たちの監視システムには、プロパティを取得しようとしているREST APIがあり、それをカスタムオブジェクトに出力しようとしています。いくつかのプロパティ値はハッシュテーブルです。カスタムオブジェクトのハッシュテーブルの処理
PowerShellで使用するためのカスタムオブジェクトの保存に加えて、これらをCSVにエクスポートしたいので、これらのハッシュテーブルを別のものにする必要があるため、Syste.Object []で終わることはありませんそれらの列。
オブジェクト
がAPIから返されたが、このようになります(切り捨て): 次に$allServices[0]
alertStatus : none
ignoreSSL : True
description : Test service
stopMonitoring : False
stopMonitoringByFolder : False
useDefaultLocationSetting : False
serviceProperties : {}
transition : 1
alertStatusPriority : 100000
serviceFolderId : 1
script :
disableAlerting : False
individualAlertLevel : warn
checkpoints : {@{id=1; geoInfo=Overall; smgId=0}, @{id=2; geoInfo=US - Los Angeles; smgId=1}, @{id=3; geoInfo=US - Washington DC; smgId=2}, @{id=4; geoInfo=US - San Francisco; smgId=3}...}
pageLoadAlertTimeInMS : 30000
sdtStatus : none-none-none
serviceStatus : alive
method : tabledriven
id : 1
チェックポイントは、次のようになります。
$allServices[0].checkpoints
id geoInfo smgId
-- ------- -----
1 Overall 0
2 US - Los Angeles 1
3 US - Washington DC 2
4 US - San Francisco 3
5 Europe - Dublin 4
6 Asia - Singapore 5
チェックポイントのプロパティに対処するための最良の方法は何ですか?
ありがとうございました。