Data - Retrieve PowerShell Output
Retrieves data after executing the specified PowerShell script for widgetID and dashboard type
GET http://<Servername>/OperationsManager/data/powershell?widgetId={widgetId}&dashboardType={dashboardType}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
dashboard
|
query | True |
string |
Specify the dashboard type |
widget
|
query | True |
string |
Specify the widget ID |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK.Successfully retrieved data after executing the specified powerShell script. Media Types: "application/json", "text/json", "application/xml", "text/xml" |
Examples
RetrievePowerShellOutput
Sample Request
GET http://<Servername>/OperationsManager/data/powershell?widgetId=8c9a13a6-0547-facb-bf43-e4af529a3468&dashboardType=MONITORING
Sample Response
{
"tableColumns": [
{
"field": "healthstate",
"header": "HealthState",
"type": "HealthStateType",
"hidden": false
},
{
"field": "displayname",
"header": "DisplayName",
"type": null,
"hidden": false
},
{
"field": "customcolumn",
"header": "CustomColumn",
"type": null,
"hidden": false
},
{
"field": "id",
"header": "Id",
"type": null,
"hidden": true
},
{
"field": "path",
"header": "Path",
"type": null,
"hidden": false
}
],
"rows": [
{
"healthstate": "unknown",
"displayname": "LlhmpKkOvfnZ2tR7VF1yIcgo02c1S7q9FPLsa9h7hl5kEHVHViIKu9vtE3wxst5xyoTmhigWi3Qgg5ktgUftzgOGecn.NuPypIvaxtkxBvm0sONJTCQYNM7SZNIF48Jxoc1YKJ5wtssD3XYPOeO",
"customcolumn": "1",
"id": "aeee35a8-c9bc-916d-a86a-ab4fd0e4f8e8",
"path": ""
},
{
"healthstate": "unknown",
"displayname": "scomdevserver.contoso.net",
"customcolumn": "2",
"id": "9f2ef630-9784-9e27-bbd0-af9900d8264f",
"path": ""
}
]
}
Definitions
Name | Description |
---|---|
Table |
|
Table |
TableColumn
Name | Type | Description |
---|---|---|
field |
string |
Name of the Column |
header |
string |
Header of the column |
hidden |
boolean |
Is column hidden |
type |
string |
Type of the Column |
TableDataResponse
Name | Type | Description |
---|---|---|
rows |
object[] |
Table Rows of data |
tableColumns |
Table columns of data |