MikePohatu / TsGui

Custom GUIs in ConfigMgr
GNU General Public License v3.0
47 stars 5 forks source link

Extending WMI query capabilities #13

Closed Elaci0 closed 2 years ago

Elaci0 commented 3 years ago

I see that at the moment TsGui does not allow the execution of external commands/scripts to read their output but we are "limited" to WMI queries. Do you think it would be possible to extend such queries to include parameters?

for example I wanted to create a validation for the computer name which would check if the computer is already existing or not. Given that I cannot query Active Directory I thought that at lease I could try to ping the "new chosen name" with a WMI query that outputs catchable results: Select * from Win32_PingStatus Where Address = 'NEWNAME'

here "NEWNAME" is fixed, I don't know it is easy to do, I was thinking about a sort of tag such linked to a GuiOption, (ComputerName in my case)

Thanks!

MikePohatu commented 3 years ago

I'll have a look, but I am actually looking at adding PowerShell support. I have a lot of the code already from DevChecker and the Birdsnest Managed Installer. If I can get script support working would this be prefferable?

Elaci0 commented 3 years ago

Really?? that would be great!! How about adding the ability to read the powershell script also from inside the XML (I am thinkng about a CDATA tags) ? I am looking forward to try the new release!

Thanks

MikePohatu commented 2 years ago

TsGui 2 released with PowerShell support