Suggestions for a PowerShell Tool to Track AI Usage on Endpoints?

0
9
Asked By TechieExplorer927 On

I've created a lightweight PowerShell utility designed for IT and security teams to monitor the usage of various AI tools on Windows endpoints. It's intended to track applications like ChatGPT, Claude, Copilot, Gemini, and several browser-based AI services that aren't always easy to monitor. The tool is standalone, requiring only SQLite as a dependency, and is designed to seamlessly integrate into existing workflows. I'd love to hear any feedback on additional data sources that could be included or advice on making the tool more PowerShell-native. Thanks!

4 Answers

Answered By CodeNinja88 On

Hey there! I noticed you're using the variable name `$profile`, which is actually one of PowerShell's built-in automatic variables. It might be a good idea to avoid that to prevent any potential conflicts. Just a heads up!

CuriousDev44 -

That's a solid point! It’s easy to overlook those built-in names. Glad someone caught it before release.

TechieExplorer927 -

Thanks for the tip! I'll definitely update that in the next version.

Answered By EfficientScripter99 On

I think having the command `Get-AIUsageDiscovery -InstallSQLite` isn’t the best approach. It should probably be split into a separate function to keep things modular and stick to the idea of each function doing one thing well.

InquisitiveThinker56 -

Can you elaborate on that? Are you suggesting that the installation for SQLite should be completely separate from the usage discovery process?

Answered By DataWhizPro On

Also, when creating modules, you really want to avoid direct outputs. Instead, focus on returning rich objects that can be formatted appropriately. That approach is much cleaner and more versatile in later use.

TechieExplorer927 -

Thanks for the advice! I’ll make sure to implement that in the next version.

Answered By DynamicCoder12 On

Just a heads up about how you're adding findings to your variable. Using `$findings += [PSCustomObject]@{...}` can be inefficient, especially in older versions of PowerShell. It might be better to collect results in a list and then add them in one go. Just a suggestion!

SkepticalGuru77 -

Totally agree! Using `+=` can be a performance hit in a loop. It's like a red flag for people who know PowerShell well.

TechieExplorer927 -

Appreciate the insight! I've gone ahead and made that change. Thanks for your help!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.