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
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!
Thanks for the tip! I'll definitely update that in the next version.
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.
Can you elaborate on that? Are you suggesting that the installation for SQLite should be completely separate from the usage discovery process?
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.
Thanks for the advice! I’ll make sure to implement that in the next version.
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!
Totally agree! Using `+=` can be a performance hit in a loop. It's like a red flag for people who know PowerShell well.
Appreciate the insight! I've gone ahead and made that change. Thanks for your help!

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