I am using the Azure Node SDK
to try this.
I am exporting the following JSON from powershell
get-process | Select Name,ID,VM,WS | Select -First 10 | ConvertTo-Json
That gives me something like this.
{
"Name": "AcroRd32",
"Id": 6776,
"VM": 185810944,
"WS": 63762432
}
{
"Name": "BCMWLTRY",
"Id": 1128,
"VM": 580022272,
"WS": 38010880
}
{
"Name": "conhost",
"Id": 332,
"VM": 52039680,
"WS": 3592192
}
Is there a way, I can grab this data from a node app.js file?
I am trying to work this into node.js / express
and socket.io
code.
I have called some web-based API's from powershell and successfully passed the variables to the REST API. http://poshcode.org/3369
However, I am having a hard-time passing the powershell JSON
data to a local node.js
instance.
Any help / pointers is appreciated.