SQL CRUD Operations in PowerShell Universal dashboard

Product: PowerShell Universal
Version: 2.5.5

I had someone ask for an example of this so I figured I would share: SQL CRUD Operations in PowerShell Universal Dashboard

2 Likes

I like seeing this example. One question I had as I looked at it is wondering why you separated out things into functions rather than just running it inline on the page? Is that more efficient or is there some other benefit to doing so?

Thanks!

I was just doing it to make it easier to read rather than having one large dashboard script. In a larger code base, it would be good for reusing common components as well.

These posts are extremely insightful and even if somebody understands how to achieve something it is nice to reference code and understand how somebody else would tackle the same problem. Thank you for taking the time to create this post!

Edit: One thing I am a bit confused on is how are you populating $RecordID. It is not abundantly clear how you are able to get the ID of the table by using $EventData.ID when the ID is not in the table itself.

Edit 2: I think I understand now. You are running SELECT * FROM [User], but not displaying it in the table on the frontend. I missed that part.