PSDGather using RestAPI calls
Hi there.
I am currently trying to set up a working PSD deploment in my environment. I´d like to get some data from the MDT database, but this function is not available with PSD. Instead, everyone is talking about using RestAPI calls which seems to work nice, but I need that kind of stuff in the very early state of my deployment, just like MDT did with it´s database queries.
After digging around and trying to understand how all this works, I decided to write my own extension for PSD where I can add RestAPI calls in CustomSettings.ini, just in the same way MDT did it. The resulting module can be found at my github repo.
On the RestAPI server side I have created a script which can be triggered by RestPS. My first idea was to let this script query an existing MDT database, but while digging through the VBS scripts from MDT I soon found out that I have absolutely no clue about databases and such. As I also like to keep my configuration files in a versioning system like GIT, I decided to create a whole new "backend" based on JSON files.
I have included a documentation of how to include and use the scripts on the client and server side. Feel free to leave comments.
https://github.com/daooze/PSDRestApi
Regards
Hi @daooze,
Nice work you have done there, I would suggest to create a pull request and ask for integration in the PSD solution.
These are great enhancements. looking to add things. I wonder if it's something we could include in the documentation. I have submitted updated documentation for RestPS.
@arwidmark and @DeploymentBunny could you please consider including those enhancements in the dev build for testing?
Interesting, we already have this, we have just never released it, the REST API is connecting to the MDT DB and use that information during OSD. It seems that we should release that part..
Would a comparison of functionality make sense with @daooze's solution Mike? At least we could integrate some functionality into the existing feature if it's enhancing it.
With the new PSD instructions on how to us RestPS (https://github.com/FriendsOfMDT/PSD/blob/master/Documentation/PowerShell%20Deployment%20-%20RestPS%20Guide%20with%20PSD.md), I think the more samples of code we can provide the better.