Open Zuldan opened 8 years ago
Wow, great idea, great question, I have no idea. I will investigate. Nudge me if I don't respond in the next few days.
Thanks Doug
Thank you Doug! I don't know where you get the time for all of this.
So just some background info...which you probably already know.
The old reporting method, a Compliance server was used in PS4 but is now being removed (scheduled for xPSDesiredStateConfiguration v3.8.0.0 https://github.com/PowerShell/xPSDesiredStateConfiguration/pull/86). So there wouldn't be any point writing up on that.
The new method is accessing OData from a Report Server. However, in PS5, there is now 2 ways to register a node with a Pull server.
$requestUri = "$serviceURL/Nodes(ConfigurationId= '$ConfigurationId')/Reports"
$requestUri = "$serviceURL/Nodes(AgentId= '$AgentId')/Reports"
I'm not sure how you would retrieve a report for 'all' nodes like you could with a Compliance server. That's what I was hoping to use ODataExplorer for.
I wrote the OData Explorer a few years ago and haven't touched it since. Great question. This is getting into DSC details. Maybe I can loop in some folks that have more insight.
At the moment, no tool can allow you to query the OData. I tried a few including Dougs tool and also extracting the Odata files via powershell. Problem is MS didnt implement any Get method so no tool returns info, accept using the $requestUri and even then its limited to that structue which is a bit meh as it requires me to run the report from each node or manage AgentIDs in which case its bit silly considering the fact we removed the dependency on ConfigurationID GUIDS only to replace it with AgentID...
Thanks for the details. I've put this on my list to pass around to some of the PS DSC folks and get their insight.
Hi Doug, I'm trying to query a DSC Report Server using your tool but I'm not having any luck.
I'm getting Exception calling "DownloadString" with "1" argument(s): "The remote server returned an error: (400) Bad Request."
https://mydscpullserver:8080/PSDSCPullServer.svc
if you want some code to quickly setup a Pull Server / Node with Report Server here is a sample https://gist.github.com/Zuldan/c679bae20de0c2dcf1aa
Any tips on how to use ODataExplorer with a DSC report server would be greatly appreciated.
On another note, it would be GREAT if you could write a blog post on how to extract reports from a DSC Report Server / OData (all nodes / per node status) and then dump the data into Excel with some fancy graphs or something ;-) It would be a great read for the whole community.