Showing results for 
Search instead for 
Did you mean: 
Create Post

Powershell Script output as Web Ressource

Powershell Script output as Web Ressource

The same way a SQL or SWQL query data can be displayed in a web resource, it would be a great plus to have the ability run a PowerShell script or command on a given node and return the data back into the Web UI.

I'm not talking about the 10 pairs a SAM Script Monitor can interpret and alarm upon, but a full script output.

Data could be displayed in the following forms:

  • As simple output text:

          Anything that output from the script could be captured and displayed.

  • Table:

          Structured data could be displayed as a table. The PowerShell Script data could be just another data source of the actual Custom Chart Table, allowing to select column, sort order etc...

          Commands like:

get-aduser -filter {(Enabled -eq $true) -and (PasswordNeverExpires -eq $false)} -properties Name, PasswordNeverExpires, PasswordExpired, PasswordLastSet | where { $_.passwordexpired -eq $true } | Format-Table

          would return data like: 


     Once defined in the Data Source Picker, this could be then used and interpreted as data to be displayed on the resource along with other data, to provide insight, tailored to the business, team or individual needs.

I see a few options that could be added to tweak the web resource:

  • How script is executed (i.e.: from Orion Server or Local via agent)
  • Whether or not display last data timestamp
  • Max number of line displayed in the output.
  • When script data is refreshed (i.e.: on every page load, first page load then every X minute), every X minute, on demand (via a "refresh data" button)
  • Script execution limits (i.e.: do not execute the script more than X time per hour, display warning if script takes more than X second to execute, etc...)

This should be available with or without SAM. I see it as a mix between SAM Script execution & standard Data display from Orion Core...

1 Comment
Level 13

Do we know if this was taken into consoderation by SWI? I'd be an happy camper if I could rely on this anytime soon... 😉